From: Nick Piggin <npiggin@suse.de>
To: Hugh Dickins <hugh@veritas.com>
Cc: Mel Gorman <mel@skynet.ie>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-mm@kvack.org
Subject: Re: [PATCH] Remove unnecessary smp_wmb from clear_user_highpage()
Date: Thu, 19 Jul 2007 04:36:45 +0200 [thread overview]
Message-ID: <20070719023645.GD23641@wotan.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0707181645590.26413@blonde.wat.veritas.com>
On Wed, Jul 18, 2007 at 05:45:22PM +0100, Hugh Dickins wrote:
> On Wed, 18 Jul 2007, Mel Gorman wrote:
> >
> > At the nudging of Andrew, I was checking to see if the architecture-specific
> > implementations of alloc_zeroed_user_highpage() can be removed or not.
>
> Ah, so that was part of the deal for getting MOVABLE in, eh ;-?
>
> > With the exception of barriers, the differences are negligible and the main
> > memory barrier is in clear_user_highpage(). However, it's unclear why it's
> > needed. Do you mind looking at the following patch and telling me if it's
> > wrong and if so, why?
> >
> > Thanks a lot.
>
> I laugh when someone approaches me with a question on barriers ;)
> I usually get confused and have to go ask someone else.
>
> And I should really to leave this query to Nick: he'll be glad of the
> opportunity to post his PageUptodate memorder patches again (looking
> in my mailbox I see versions from February, but I'm pretty sure he put
> out a more compact, less scary one later on). He contends that the
> barrier in clear_user_highpage should not be there, but instead
> barriers (usually) needed when setting and testing PageUptodate.
And btw. (I don't think you're confused, but the last sentence could
be mislreading to readers)... I don't contend the barrier should not be
there in that it is _technically_ wrong... but logicaly the condition
we are interested in is whether the page is uptodate or not (the fact
that we only ever have uptodate pages in ptes *cough*, and the causal
dependency on *pte -> page means we don't bother setting or checking
PageUptodate for anonymous faults, but the logical condition we want
is that the page is uptodate).
So when I found that both ordering problems (fault and read(2)) could
be solved with PageUptodate, it just seems like a better place to
put it than in clear_user_highpage.
--
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-07-19 2:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-18 15:05 Mel Gorman
2007-07-18 16:45 ` Hugh Dickins
2007-07-19 2:17 ` Nick Piggin
2007-07-20 13:08 ` Mel Gorman
2007-07-23 2:02 ` Nick Piggin
2007-07-19 2:28 ` Linus Torvalds
2007-07-19 2:58 ` Nick Piggin
2007-07-19 2:36 ` Nick Piggin [this message]
2007-07-19 11:16 ` Mel Gorman
2007-07-19 1:57 ` Nick Piggin
2007-07-20 21:06 Oleg Nesterov
2007-07-20 21:57 ` Linus Torvalds
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=20070719023645.GD23641@wotan.suse.de \
--to=npiggin@suse.de \
--cc=hugh@veritas.com \
--cc=linux-mm@kvack.org \
--cc=mel@skynet.ie \
--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