From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
hugh@veritas.com, paulus@samba.org, anton@samba.org,
akpm@osdl.org, andrea@suse.de, linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>
Subject: Re: Possible memory ordering bug in page reclaim?
Date: Sun, 16 Oct 2005 10:04:21 +1000 [thread overview]
Message-ID: <43519905.40902@yahoo.com.au> (raw)
In-Reply-To: <Pine.LNX.4.64.0510150945460.23590@g5.osdl.org>
Linus Torvalds wrote:
> I agree, however, that it looks like PG_dirty is racy. Probably not in
> practice, but still.
>
> So I'd suggest adding a smp_wmb() into set_page_dirty, and the rmb where
> Nick suggested.
>
> So I'd suggest a patch something more like this.. Marking the dirty/count
> cases unlikely too in mm/page-writeback.c, since we should have tested for
> these conditions optimistically outside the lock.
>
As Dave suggested, I think there is too much other code that depends on
these atomics to be barriers for us to change it (at least not in this
patch! :)).
> Comments? Nick, did you have some test-case that you think might actually
> have been impacted by this?
>
I guess your vmscan.c hunks are slightly nicer, though I might put
'cannot_free' right at the end, because it will be a very uncommon case.
And no, I don't have a test case. In fact, I wouldn't be surprised if
nobody anywhere has ever hit it :) I was just browsing code...
Thanks,
Nick
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
next prev parent reply other threads:[~2005-10-16 0:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-15 3:28 Possible memory ordering bug in page reclaim? Nick Piggin
2005-10-15 6:17 ` Hugh Dickins
2005-10-15 7:43 ` Benjamin Herrenschmidt
2005-10-15 8:00 ` Herbert Xu
2005-10-15 16:57 ` Linus Torvalds
2005-10-15 19:29 ` David S. Miller
2005-10-15 22:17 ` Benjamin Herrenschmidt
2005-10-16 0:04 ` Nick Piggin [this message]
2005-10-15 8:59 ` Nick Piggin
2005-10-15 12:08 ` Herbert Xu
2005-10-15 13:35 ` Nick Piggin
2005-10-15 18:00 ` Andrea Arcangeli
2005-10-15 19:48 ` Herbert Xu
2005-10-15 20:07 ` Andrea Arcangeli
2005-10-15 23:07 ` David S. Miller
2005-10-16 19:36 ` Ivan Kokshaysky
2005-10-17 4:29 ` David S. Miller
2005-10-17 7:23 ` Ivan Kokshaysky
2005-10-17 11:28 ` Andrea Arcangeli
2005-10-15 22:16 ` Benjamin Herrenschmidt
2005-10-15 23:13 ` David S. Miller
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=43519905.40902@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@osdl.org \
--cc=andrea@suse.de \
--cc=anton@samba.org \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.