From: Ralf Baechle Date: Thu, 7 Dec 2006 04:40:26 +0000 (-0800) Subject: [PATCH] futex: remove unneeded barrier X-Git-Tag: v2.6.20-rc1~145^2^2~51 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=ccdea2f88b5689f0fd29c3804be43a3acf0311e3;p=~emulex%2Finfiniband.git [PATCH] futex: remove unneeded barrier 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(). Signed-off-by: Ralf Baechle Acked-by: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/futex.c b/kernel/futex.c index d60b7f7a8cc..a8302a1620e 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -552,7 +552,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; }