Skip to contentSkip to conversation

RFC: Unneeded memory barriers

PATCH Ralf Baechle 1 participant 1 message Dec 1, 2006

lore
Share & tools
lore
#0 lore raw

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

kernel/futex.c +1 -1
index 93ef30b..d867899 100644
@@ -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;
 }