RE: [PATCH] General purpose zeroed page slab

From: Luck, Tony <tony.luck_at_intel.com>
Date: 2004-10-19 05:03:04
>It's probably worth doing this with a static cachep in slab.c and only
>exposing a get_zeroed_page() / free_zeroed_page() interface, with the
>latter doing the memset to 0.  I disagree with Andi over the dumbness
>of zeroing the whole page.  That makes it cache-hot, which is what you
>want from a page you allocate from slab.

We started this discussion with the plan of using this interface to
allocate/free page tables at all levels in the page table hierarchy
(rather than maintain a special purpose "quicklist" allocator for each
level).  This is a somewhat specialized usage in that we know that we
have a completely zeroed page when we free ... so we really don't
want the overhead of zeroing it again.  There is also somewhat limited
benefit to the cache hotness argument here as most page tables (especially
higher-order ones) are used very sparsely.

That said, the idea to expose this slab only through a specific API
should calm fears about accidental mis-use (with people freeing a page
that isn't all zeroes).

-Tony
-
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 Mon Oct 18 15:27:33 2004

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