* RFC: Unneeded memory barriers
@ 2006-12-01 14:11 Ralf Baechle
0 siblings, 0 replies; only message in thread
From: Ralf Baechle @ 2006-12-01 14:11 UTC (permalink / raw)
To: linux-kernel
When disassembling a kernel I found around over 90 sync Instructions from
mb, rmb and wmb calls in the kernel and only few of those make any sense
to me. So here's the first one - I think the wmb() in kernel/futex.c is
not needed on uniprocessors so should become an smb_wmb().
Ralf
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
diff --git a/kernel/futex.c b/kernel/futex.c
index 93ef30b..d867899 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -553,7 +553,7 @@ static void wake_futex(struct futex_q *q
* at the end of wake_up_all() does not prevent this store from
* moving.
*/
- wmb();
+ smp_wmb();
q->lock_ptr = NULL;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-01 14:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-01 14:11 RFC: Unneeded memory barriers Ralf Baechle
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.