From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Zoltan Menyhart <Zoltan.Menyhart@bull.net>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: unlock_buffer() and clear_bit()
Date: Mon, 27 Mar 2006 20:56:46 +1000 [thread overview]
Message-ID: <4427C4EE.1070807@yahoo.com.au> (raw)
In-Reply-To: <4427C284.3020206@yahoo.com.au>
Nick Piggin wrote:
> smp_mb__after_clear_bit() is supposed to, when run directly after
> a clear_bit operation, provide the equivalent of an smp_mb().
>
Actually I guess I'm wrong here: it appears that it really should
order before, and after the clear_bit, respectively (looking at
its usage in unlock_page.
So ia64's smp_mb__before_clear_bit needs to be a full barrier, but
__after_clear_bit can be a release. I think?
By the way unlock_page is issuing extra barriers:
Documentation/atomic_ops.txt defines test_and_clear_bit operations
to provide full memory barriers before and after them, so no need
for smp_mb__before/after there.
...ia64 gets these test_and_x_bit operations wrong as well...
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
prev parent reply other threads:[~2006-03-27 10:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-24 23:24 unlock_buffer() and clear_bit() Zoltan Menyhart
2006-03-25 12:02 ` Andrew Morton
2006-03-27 8:53 ` Zoltan Menyhart
2006-03-27 9:07 ` Andrew Morton
2006-03-27 9:38 ` Zoltan Menyhart
2006-03-27 10:46 ` Nick Piggin
2006-03-27 10:56 ` Nick Piggin [this message]
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=4427C4EE.1070807@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=Zoltan.Menyhart@bull.net \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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