From: Matthew Wilcox <matthew@wil.cx>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Matthew Wilcox <matthew@wil.cx>,
"Martin K. Petersen" <mkp@wildopensource.com>,
Andi Kleen <ak@suse.de>,
linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
akpm@osdl.org
Subject: Re: [PATCH] General purpose zeroed page slab
Date: Mon, 18 Oct 2004 19:14:12 +0000 [thread overview]
Message-ID: <20041018191412.GJ16153@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <B8E391BBE9FE384DAA4C5C003888BE6F0236348B@scsmsx401.amr.corp.intel.com>
On Mon, Oct 18, 2004 at 12:03:04PM -0700, Luck, Tony wrote:
> >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.
Ah, I'm not a VM weenie, so I didn't know this was guaranteed ;-)
> 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).
So alloc_zeroed_page(), free_zeroed_page(), zero_and_free_page()
interfaces with a CONFIG option to check that the page passed to
free_zeroed_page() is already zero?
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
prev parent reply other threads:[~2004-10-18 19:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-14 16:50 [PATCH] General purpose zeroed page slab Martin K. Petersen
2004-10-14 17:30 ` Brian Gerst
2004-10-14 17:36 ` Matthew Wilcox
2004-10-14 18:49 ` Dave Jones
2004-10-14 19:08 ` Denis Vlasenko
2004-10-14 19:47 ` Matthew Wilcox
2004-10-14 18:04 ` Andi Kleen
2004-10-14 23:36 ` Adam Heath
2004-10-15 1:18 ` Andi Kleen
2004-10-18 18:06 ` Martin K. Petersen
2004-10-18 18:42 ` Matthew Wilcox
2004-10-18 18:54 ` Martin K. Petersen
2004-10-18 19:06 ` Andi Kleen
2004-10-18 21:06 ` Andi Kleen
2004-10-18 19:03 ` Luck, Tony
2004-10-18 19:14 ` Matthew Wilcox [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041018191412.GJ16153@parcelfarce.linux.theplanet.co.uk \
--to=matthew@wil.cx \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkp@wildopensource.com \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox