From: Andi Kleen <ak@suse.de>
To: Christoph Lameter <clameter@sgi.com>
Cc: Andi Kleen <ak@suse.de>, linux-kernel@vger.kernel.org
Subject: Re: Increase page fault rate by prezeroing V1 [1/3]: Introduce __GFP_ZERO
Date: Wed, 22 Dec 2004 11:53:01 +0100 [thread overview]
Message-ID: <20041222105301.GE15894@wotan.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0412211452110.2541@schroedinger.engr.sgi.com>
On Tue, Dec 21, 2004 at 02:54:46PM -0800, Christoph Lameter wrote:
> On Tue, 21 Dec 2004, Andi Kleen wrote:
>
> > Christoph Lameter <clameter@sgi.com> writes:
> > > @@ -0,0 +1,52 @@
> > > +/*
> > > + * Zero a page.
> > > + * rdi page
> > > + */
> > > + .globl zero_page
> > > + .p2align 4
> > > +zero_page:
> > > + xorl %eax,%eax
> > > + movl $4096/64,%ecx
> > > + shl %ecx, %esi
> >
> > Surely must be shl %esi,%ecx
>
> Ahh. Thanks.
>
> > But for the one instruction it seems overkill to me to have a new
> > function. How about you just extend clear_page with the order argument?
>
> We can just
>
> #define clear_page(__p) zero_page(__p, 0)
>
> and remove clear_page?
It depends. If you plan to do really big zero_page then it
may be worth experimenting with cache bypassing clears
(movntq) or even SSE2 16 byte stores (movntdq %xmm..,..)
and take out the rep ; stosq optimization. I tried it all
long ago and it wasn't a win for only 4K.
For normal 4K clear_page that's definitely not a win (tested)
and especially cache bypassing is a loss.
>
> >
> > BTW I think Andrea has been playing with prezeroing on x86 and
> > he found no benefit at all. So it's doubtful it makes any sense
> > on x86/x86-64.
>
> Andrea's approach was:
>
> 1. Zero hot pages
> 2. Zero single pages
>
> which simply results in shifting the processing time somewhere else.
Yours too at least on non Altix no? Can you demonstrate any benefit?
Where are the numbers?
I'm sceptical for example that there will be enough higher orders
to make the batch clearing worthwhile after the system is up for a days.
Normally memory tends to fragment rather badly in Linux.
I suspect after some time your approach will just degenerate to be
the same as Andrea's, even if it should be a win at the beginning (is it?)
-Andi
next prev parent reply other threads:[~2004-12-22 10:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <B8E391BBE9FE384DAA4C5C003888BE6F02900FBD@scsmsx401.amr.corp.intel.com.suse.lists.linux.kernel>
[not found] ` <41C20E3E.3070209@yahoo.com.au.suse.lists.linux.kernel>
[not found] ` <Pine.LNX.4.58.0412211154100.1313@schroedinger.engr.sgi.com.suse.lists.linux.kernel>
[not found] ` <Pine.LNX.4.58.0412211155340.1313@schroedinger.engr.sgi.com.suse.lists.linux.kernel>
2004-12-21 22:40 ` Increase page fault rate by prezeroing V1 [1/3]: Introduce __GFP_ZERO Andi Kleen
2004-12-21 22:54 ` Christoph Lameter
2004-12-22 10:53 ` Andi Kleen [this message]
2004-12-22 19:54 ` Christoph Lameter
[not found] ` <Pine.LNX.4.58.0412231119540.31791@schroedinger.engr.sgi.com.suse.lists.linux.kernel>
2004-12-23 20:27 ` Prezeroing V2 [0/3]: Why and When it works Andi Kleen
2004-12-23 21:02 ` Christoph Lameter
2004-12-22 1:40 Increase page fault rate by prezeroing V1 [1/3]: Introduce __GFP_ZERO Chuck Ebbert
-- strict thread matches above, loose matches on Subject: below --
2004-12-16 18:38 [very very drafty] prezeroing to increase the page fault rate Luck, Tony
2004-12-16 22:37 ` Nick Piggin
2004-12-21 19:55 ` Increase page fault rate by prezeroing V1 [0/3]: Overview Christoph Lameter
2004-12-21 19:56 ` Increase page fault rate by prezeroing V1 [1/3]: Introduce __GFP_ZERO Christoph Lameter
2004-12-21 19:56 ` Christoph Lameter
2004-12-21 19:56 ` Christoph Lameter
2004-12-21 19:56 ` Christoph Lameter
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=20041222105301.GE15894@wotan.suse.de \
--to=ak@suse.de \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.