From: Ralf Baechle <ralf@linux-mips.org>
To: linux-kernel@vger.kernel.org
Subject: RFC: Unneeded memory barriers
Date: Fri, 1 Dec 2006 14:11:30 +0000 [thread overview]
Message-ID: <20061201141130.GA24203@linux-mips.org> (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
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;
}
reply other threads:[~2006-12-01 14:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20061201141130.GA24203@linux-mips.org \
--to=ralf@linux-mips.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 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.