From: Nick Piggin <npiggin@suse.de>
To: Hugh Dickins <hugh@veritas.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
tee@sgi.com, holt@sgi.com
Subject: Re: [rfc][patch 1/2] mm: dont account ZERO_PAGE
Date: Fri, 30 Mar 2007 03:46:34 +0200 [thread overview]
Message-ID: <20070330014633.GA19407@wotan.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0703291324090.21577@blonde.wat.veritas.com>
On Thu, Mar 29, 2007 at 02:10:55PM +0100, Hugh Dickins wrote:
> On Thu, 29 Mar 2007, Nick Piggin wrote:
> >
> > Special-case the ZERO_PAGE to prevent it from being accounted like a normal
> > mapped page. This is not illogical or unclean, because the ZERO_PAGE is
> > heavily special cased through the page fault path.
>
> Thou dost protest too much! By "heavily special cased through the page
> fault path" you mean do_wp_page() uses a pre-zeroed page when it spots
> it, instead of copying its data. That's rather a different case.
That, and the use of the zero page _at all_ in the do_anonymous_page
and zeromap, and I guess our anti-wrapping hacks in the page allocator...
it is just done for a little optimisation, so I figure it wouldn't hurt
to optimise a bit more ;)
> Look, I don't have any vehement objection to exempting the ZERO_PAGE
> from accounting: if you remember before, I just suggested it was of
> questionable value to exempt it, and the exemption should be made a
> separate patch.
>
> But this patch is not complete, is it? For example, fremap.c's
> zap_pte? I haven't checked further. I was going to suggest you
> should make ZERO_PAGEs fail vm_normal_page, but I guess do_wp_page
> wouldn't behave very well then ;) Tucking the tests away in some
> vm_normal_page-like function might make them more acceptable.
Yeah I was going to do that, but noted the do_wp_page thingy. I don't
know... it might be better though... vm_refcounted_page()?
> > A test-case which took over 2 hours to complete on a 1024 core Altix
> > takes around 2 seconds afterward.
>
> Oh, it's easy to devise a test-case of that kind, but does it matter
> in real life? I admit that what most people run on their 1024-core
> Altices will be significantly different from what I checked on my
> laptop back then, but in my case use of the ZERO_PAGE didn't look
> common enough to make special cases for.
Yeah I don't have access to the box, but it was a constructed test
of some kind. However this is basically a dead box situation... on
smaller systems we could still see performance improvements.
And the other thing is I'd like to be able to get rid of the wrapping
tests from the page allocator and PageReserved from the kernel entirely
at some point.
> You put forward a pagecache replication patch a few weeks ago.
> That's what I expected to happen to the ZERO_PAGE, once NUMA folks
> complained of the accounting. Isn't that a better way to go?
Not sure how much remote memory access the ZERO_PAGE itself causes.
It is obviously readonly data, and itaniums have pretty big caches,
so it is more important to get rid of the bouncing cachelines.
Per node ZERO_PAGE could be a good idea, however you can still have
all pages come from a single node (eg. a forking server)...
> Or is there some important app on the Altix which uses the
> ZERO_PAGE so very much, that its interesting data remains shared
> between nodes forever, and it's only its struct page cacheline
> bouncing dirtily from one to another that slows things down?
Can't answer that. I think they are worried about this being hit in
the field.
Does the ZERO_PAGE help _any_ real workloads? It will cost an extra
fault any time you are not content with its interesting data. I
don't know why any performance critical app would read huge swaths
of zeroes, but there is probably a reason for it...
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-03-30 1:46 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-29 7:58 Nick Piggin
2007-03-29 7:58 ` [rfc][patch 2/2] mips: reinstate move_pte Nick Piggin
2007-03-29 17:49 ` Linus Torvalds
2007-03-29 13:10 ` [rfc][patch 1/2] mm: dont account ZERO_PAGE Hugh Dickins
2007-03-30 1:46 ` Nick Piggin [this message]
2007-03-30 2:59 ` Robin Holt
2007-03-30 3:09 ` Nick Piggin
2007-03-30 9:23 ` Robin Holt
2007-03-30 2:40 ` Nick Piggin
2007-04-04 3:37 ` [rfc] no ZERO_PAGE? Nick Piggin
2007-04-04 9:45 ` Hugh Dickins
2007-04-04 10:24 ` Nick Piggin
2007-04-04 12:27 ` Andrea Arcangeli
2007-04-04 13:55 ` Dan Aloni
2007-04-04 14:14 ` Andrea Arcangeli
2007-04-04 14:44 ` Dan Aloni
2007-04-04 15:03 ` Hugh Dickins
2007-04-04 15:34 ` Andrea Arcangeli
2007-04-04 15:41 ` Hugh Dickins
2007-04-04 16:07 ` Andrea Arcangeli
2007-04-04 16:14 ` Linus Torvalds
2007-04-04 15:27 ` Andrea Arcangeli
2007-04-04 16:15 ` Dan Aloni
2007-04-04 16:48 ` Andrea Arcangeli
2007-04-04 12:45 ` Hugh Dickins
2007-04-04 13:05 ` Andrea Arcangeli
2007-04-04 13:32 ` Hugh Dickins
2007-04-04 13:40 ` Andrea Arcangeli
2007-04-04 15:35 ` Linus Torvalds
2007-04-04 15:48 ` Andrea Arcangeli
2007-04-04 16:09 ` Linus Torvalds
2007-04-04 16:23 ` Andrea Arcangeli
2007-04-04 16:10 ` Hugh Dickins
2007-04-04 16:31 ` Andrea Arcangeli
2007-04-04 22:07 ` Valdis.Kletnieks
2007-04-04 16:32 ` Eric Dumazet
2007-04-04 17:02 ` Linus Torvalds
2007-04-04 19:15 ` Andrew Morton
2007-04-04 20:11 ` David Miller, Linus Torvalds
2007-04-04 20:50 ` Andrew Morton
2007-04-05 2:03 ` Nick Piggin
2007-04-05 5:23 ` Andrea Arcangeli
2007-04-04 22:05 ` Valdis.Kletnieks
2007-04-05 0:27 ` Linus Torvalds
2007-04-05 1:25 ` Valdis.Kletnieks
2007-04-05 2:30 ` Nick Piggin
2007-04-05 5:37 ` William Lee Irwin III
2007-04-05 17:23 ` Valdis.Kletnieks
2007-04-05 4:47 ` Nick Piggin
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=20070330014633.GA19407@wotan.suse.de \
--to=npiggin@suse.de \
--cc=akpm@linux-foundation.org \
--cc=holt@sgi.com \
--cc=hugh@veritas.com \
--cc=linux-mm@kvack.org \
--cc=tee@sgi.com \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox