lkml.org 
[lkml]   [2006]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: unlock_buffer() and clear_bit()
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-27 13:01    [W:0.049 / U:1.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site