From: Nick Piggin <npiggin@suse.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"hugh.dickins@tiscali.co.uk" <hugh.dickins@tiscali.co.uk>,
avi@redhat.com,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Subject: Re: [RFC][PATCH 0/4] ZERO PAGE again v2
Date: Thu, 9 Jul 2009 09:47:45 +0200 [thread overview]
Message-ID: <20090709074745.GT2714@wotan.suse.de> (raw)
In-Reply-To: <alpine.LFD.2.01.0907080906410.3210@localhost.localdomain>
On Wed, Jul 08, 2009 at 09:07:08AM -0700, Linus Torvalds wrote:
>
>
> On Wed, 8 Jul 2009, Nick Piggin wrote:
> >
> > I'm talking about the cases where you would want to use ZERO_PAGE for
> > computing with anonymous memory (not for zeroing IO). In that case,
> > the TLB would probably be the primary one.
>
> Umm. Are you even listening to yourself?
>
> OF COURSE the TLB would be the primary issue, since the zero page has made
> cache effects go away.
Yes, that's what I said.
> BUT THAT IS A GOOD THING.
>
> Instead of making it sound like "that's a bad thing, because now TLB
> dominates", just say what's really going on: "that's a good thing, because
> you made the cache access patterns wonderful".
>
> See? You claim TLB is a problem, but it's really that you made all _other_
> problems go away.
No I don't. Re-read what I wrote. I said that an app that scans huge
sparse matricies *might* be better off with a different data format
rather than relying on ZERO_PAGE with a naive format. Of course if it
does rely on ZERO_PAGE for this, then having ZERO_PAGE is going to be
better than allocating lots of anonymous memory for it, I didn't caim
otherwise.
> Now, it's true that you can avoid the TLB costs by moving the costs into a
> "software TLB" (aka "indirection table"), and make the TLB footprint go
> away by turning it into something else (indirection through a pointer).
>
> Sometimes that speeds things up - because you may be able to actually
> avoid doing other things by noticing huge gaps etc - but sometimes it
> slows you down too - because indirection isn't free, and maybe there are
> common cases where there isn't so many sparse accesses.
Sometimes there are much for efficient data formats for sparse
matricies too, which can also avoid the quantization effects
(and cache usage) of page size.
> > I don't fight it. I had proposals to get rid of cache pingpong too,
> > but you rejected that ;)
>
> Yeah, and they were ugly as hell. I had a suggestion to just continue to
> use PG_reserved (which was _way_ simpler than your version) before the
> counting, but you and Hugh were on a religious agenda against the whole
> PG_reserved bit.
No I had no problem with it. I didn't see the big difference between
explicitly testing for ZERO_PAGE or using a new page flag bit (which
aren't free -- PG_reserved can basicaly be reclaimed now if somebody
cares to go through arch init code).
Now if there was more than one type of page to test for, then yes
a page flag would be better because it would reduce branches. I
just didn't see why you were religiously against testing ZERO_PAGE
but thought PG_zero (or PG_reserved or whatever) was so much better.
> So I don't understand why you claim that you fight it, when you CLEARLY
> do. The patches that KAMEZAWA-san posted were already simpler than your
> complicated models were - I just think they can be simpler still.
Having a ZERO_PAGE I'm not against, so I don't know why you claim
I am. Al I'm saying is that now we don't have one, we should have
some good reasons to introduce it again. Unreasonable?
--
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:[~2009-07-09 7:32 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-07 7:51 [RFC][PATCH 0/4] ZERO PAGE again v2 KAMEZAWA Hiroyuki
2009-07-07 7:52 ` [RFC][PATCH 1/4] introduce pte_zero() KAMEZAWA Hiroyuki
2009-07-07 7:54 ` [RFC][PATCH 2/4] use ZERO_PAGE for READ fault in regular anonymous mapping KAMEZAWA Hiroyuki
2009-07-07 7:59 ` [RFC][PATCH 3/4] get_user_pages READ fault handling special cases KAMEZAWA Hiroyuki
2009-07-07 16:50 ` Linus Torvalds
2009-07-08 0:03 ` KAMEZAWA Hiroyuki
2009-07-08 1:38 ` KAMEZAWA Hiroyuki
2009-07-08 2:27 ` Linus Torvalds
2009-07-07 8:01 ` [RFC][PATCH 4/4] add get user pages nozero KAMEZAWA Hiroyuki
2009-07-07 8:47 ` [RFC][PATCH 0/4] ZERO PAGE again v2 Nick Piggin
2009-07-07 9:05 ` Avi Kivity
2009-07-07 9:18 ` KAMEZAWA Hiroyuki
2009-07-07 9:26 ` Avi Kivity
2009-07-07 9:06 ` KAMEZAWA Hiroyuki
2009-07-07 14:00 ` Nick Piggin
2009-07-07 16:59 ` Linus Torvalds
2009-07-08 6:21 ` Nick Piggin
2009-07-08 16:07 ` Linus Torvalds
2009-07-09 7:47 ` Nick Piggin [this message]
2009-07-09 17:54 ` Linus Torvalds
2009-07-10 2:09 ` Nick Piggin
2009-07-10 3:38 ` Linus Torvalds
2009-07-10 3:51 ` Nick Piggin
2009-07-08 17:32 ` Andrea Arcangeli
2009-07-09 1:12 ` KAMEZAWA Hiroyuki
2009-07-10 11:18 ` Hugh Dickins
2009-07-10 13:42 ` Andrea Arcangeli
2009-07-10 14:12 ` KAMEZAWA Hiroyuki
2009-07-10 15:16 ` Andrea Arcangeli
2009-07-10 15:32 ` KAMEZAWA Hiroyuki
2009-07-10 17:09 ` Hugh Dickins
2009-07-13 6:46 ` Nick Piggin
2009-07-13 7:24 ` Nick Piggin
-- strict thread matches above, loose matches on Subject: below --
2009-07-07 15:50 KAMEZAWA Hiroyuki
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=20090709074745.GT2714@wotan.suse.de \
--to=npiggin@suse.de \
--cc=akpm@linux-foundation.org \
--cc=avi@redhat.com \
--cc=hugh.dickins@tiscali.co.uk \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--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;
as well as URLs for NNTP newsgroup(s).