mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: benh@kernel.crashing.org, paulmck@linux.vnet.ibm.com,
	Ingo Molnar <mingo@elte.hu>, Boqun Feng <boqun.feng@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	will.deacon@arm.com, 1vier1@web.de,
	Davidlohr Bueso <dave@stgolabs.net>,
	Manfred Spraul <manfred@colorfullife.com>
Subject: [PATCH 9/7] ipc/sem.c: Remove another memory barrier.
Date: Thu,  1 Sep 2016 17:27:53 +0200	[thread overview]
Message-ID: <1472743673-15585-2-git-send-email-manfred@colorfullife.com> (raw)
In-Reply-To: <1472743673-15585-1-git-send-email-manfred@colorfullife.com>

As spin_unlock_wait() is defined as equivalent to spin_lock();
spin_unlock(), the memory barrier before spin_unlock_wait()
is not required.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
---
 ipc/sem.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/ipc/sem.c b/ipc/sem.c
index a5da82c..2bef9c0 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -280,11 +280,7 @@ static void complexmode_enter(struct sem_array *sma)
 		return;
 	}
 
-	/* We need a full barrier after seting complex_mode:
-	 * The write to complex_mode must be visible
-	 * before we read the first sem->lock spinlock state.
-	 */
-	smp_store_mb(sma->complex_mode, true);
+	sma->complex_mode = true;
 
 	for (i = 0; i < sma->sem_nsems; i++) {
 		sem = sma->sem_base + i;
-- 
2.7.4

  reply	other threads:[~2016-09-01 15:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01 15:27 [PATCH 8/7] net/netfilter/nf_conntrack_core: " Manfred Spraul
2016-09-01 15:27 ` Manfred Spraul [this message]
2016-09-01 15:30 ` Will Deacon
2016-09-01 16:41   ` Peter Zijlstra
2016-09-02  6:17     ` Boqun Feng
2016-09-02  6:35     ` Manfred Spraul
2016-09-02 19:22       ` Peter Zijlstra
2016-09-03  5:33         ` Manfred Spraul
2016-09-05 18:57         ` Manfred Spraul
2016-09-06 17:56           ` Will Deacon

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=1472743673-15585-2-git-send-email-manfred@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=1vier1@web.de \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=boqun.feng@gmail.com \
    --cc=dave@stgolabs.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=will.deacon@arm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®