From: Chris Mason <mason@suse.com>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Andrew Morton <akpm@osdl.org>,
marcelo.tosatti@cyclades.com, linux-kernel@vger.kernel.org
Subject: Re: Unnecessary barrier in sync_page()?
Date: Wed, 07 Jul 2004 17:15:01 -0400 [thread overview]
Message-ID: <1089234901.3956.88.camel@watt.suse.com> (raw)
In-Reply-To: <20040707210608.GS28479@dualathlon.random>
On Wed, 2004-07-07 at 17:06, Andrea Arcangeli wrote:
> On Wed, Jul 07, 2004 at 04:57:04PM -0400, Chris Mason wrote:
> > I wasn't worried about the locked bit when I added the barrier, my goal
> > was to order things with people that set page->mapping to null.
>
> page->mapping cannot change from NULL to non-NULL there.
>
> it can only change from non-NULL to NULL, and there's no way to
> serialize with the truncate without taking the page lock.
>
> The one extremely important fix you did around the same time, has been
> to "cache" the value of "mapping" in the kernel stack, so that it
> remains the same during the while function (so that it cannot start
> non-NULL an finish NULL). But the smp_mb() itself cannot make a
> difference as far as I can tell.
As Andrew pointed out back then, page->mapping can go to null, but even
if we have a stale copy of page->mapping, the mapping can't be freed.
So you're right that it should be enough to keep the change to cache the
value of mapping.
I was hunting the backing dev info bugs back then, and seem to have
talked myself into the barriers while testing...
-chris
next prev parent reply other threads:[~2004-07-07 21:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-07 17:57 Marcelo Tosatti
2004-07-07 18:20 ` Andrea Arcangeli
2004-07-07 18:29 ` Andrew Morton
2004-07-07 18:42 ` Andrea Arcangeli
2004-07-07 18:46 ` Andrea Arcangeli
2004-07-07 20:57 ` Chris Mason
2004-07-07 21:06 ` Andrea Arcangeli
2004-07-07 21:15 ` Chris Mason [this message]
2004-07-07 21:30 ` Andrew Morton
2004-07-07 21:34 ` Chris Mason
2004-07-07 22:02 ` Andrea Arcangeli
2004-07-07 22:27 ` Andrew Morton
2004-07-07 18:58 ` Marcelo Tosatti
2004-07-07 19:12 ` Andrea Arcangeli
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=1089234901.3956.88.camel@watt.suse.com \
--to=mason@suse.com \
--cc=akpm@osdl.org \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
/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
all inboxes | Powered by JetHome®