From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Nick Piggin <npiggin@suse.de>
Cc: "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>,
torvalds@linux-foundation.org
Subject: Re: [RFC][PATCH 0/4] ZERO PAGE again v2
Date: Tue, 7 Jul 2009 18:06:29 +0900 [thread overview]
Message-ID: <20090707180629.cd3ac4b6.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20090707084750.GX2714@wotan.suse.de>
On Tue, 7 Jul 2009 10:47:50 +0200
Nick Piggin <npiggin@suse.de> wrote:
> On Tue, Jul 07, 2009 at 04:51:01PM +0900, KAMEZAWA Hiroyuki wrote:
> > Hi, this is ZERO_PAGE mapping revival patch v2.
> >
> > ZERO PAGE was removed in 2.6.24 (=> http://lkml.org/lkml/2007/10/9/112)
> > and I had no objections.
> >
> > In these days, at user support jobs, I noticed a few of customers
> > are making use of ZERO_PAGE intentionally...brutal mmap and scan, etc.
> > (For example, scanning big sparse table and save the contents.)
> >
> > They are using RHEL4-5(before 2.6.18) then they don't notice that ZERO_PAGE
> > is gone, yet.
> > yes, I can say "ZERO PAGE is gone" to them in next generation distro.
> >
> > Recently, a question comes to lkml (http://lkml.org/lkml/2009/6/4/383
> >
> > Maybe there are some users of ZERO_PAGE other than my customers.
> > So, can't we use ZERO_PAGE again ?
> >
> > IIUC, the problem of ZERO_PAGE was
> > - reference count cache ping-pong
> > - complicated handling.
> > - the behavior page-fault-twice can make applications slow.
> >
> > This patch is a trial to de-refcounted ZERO_PAGE.
> >
> > This includes 4 patches.
> > [1/4] introduce pte_zero() at el.
> > [2/4] use ZERO_PAGE for READ fault in anonymous mapping.
> > [3/4] corner cases, get_user_pages()
> > [4/4] introduce get_user_pages_nozero().
> >
> > I feel these patches needs to be clearer but includes almost all
> > messes we have to handle at using ZERO_PAGE again.
> >
> > What I feel now is
> > a. technically, we can do because we did.
> > b. Considering maintenance, code's beauty etc.. ZERO_PAGE adds messes.
> > c. Very big benefits for some (a few?) users but no benefits to usual programs.
> >
> > There are trade-off between b. and c.
> >
> > Any comments are welcome.
>
> Can we just try to wean them off it? Using zero page for huge sparse
> matricies is probably not ideal anyway because it needs to still be
> faulted in and it occupies TLB space. They might see better performance
> by using a better algorithm.
>
TLB usage is another problem I think...
I agreed removal of ZERO_PAGE in 2.6.24. But I'm now retrying this
because of following reasons.
1. From programmer's perspective, I almost agree to you. But considering users,
most of them are _not_ programmers, saying "please rewrite your program
because OS changed its implementation" is no help.
What they want is calclating something and not writing a program.
2. This change is _very_ implicit and doesn't affect alomost all programs.
I think ZERO_PAGE() is used only when an apllication does some special jobs.
Then, most of users will not notice that ZERO_PAGE is not available until
he(she) find OOM-Killer message. This is very terrible situation for me.
(and most of system admins.)
3. Considering save&restore application's data table, ZERO_PAGE is useful.
maybe.
Thanks,
-Kame
--
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-07 8:24 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-07 7:51 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 [this message]
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
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
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=20090707180629.cd3ac4b6.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=avi@redhat.com \
--cc=hugh.dickins@tiscali.co.uk \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--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