Re: fast path for anonymous memory allocation

From: Christoph Lameter <clameter_at_sgi.com>
Date: 2004-11-19 14:28:41
On Fri, 19 Nov 2004, Nick Piggin wrote:

> But you're doing it after you've set up a pte for that page you are
> clearing... I think? What's to stop another thread trying to read or
> write to it concurrently?

Nothing. If this had led to anything then we would have needed to address
this issue. The clearing had to be outside of the lock in order not to
impact the performance tests negatively.

> > If you do the clearing with the page table lock held then performance will
> > suffer.
> Yeah very much, but if you allocate and clear a "just in case" page
> _before_ taking any locks for the fault then you'd be able to go
> straight through do_anonymous_page.
>
> But yeah that has other issues like having a spare page per CPU (maybe
> not so great a loss), and having anonymous faults much more likely to
> get pages which are cache cold.

You may be able to implement that using the hot and cold lists. Have
something that runs on the lists and prezeros and preformats these pages
(idle thread?).

Set some flag to indicate that a page has been prepared and then just zing
it in if do_anymous_page finds that flag said.

But I think this may be introduce way too much complexity
into the page fault handler.
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Nov 18 22:29:14 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:32 EST