Messages in this thread Patch in this message | | | From | Manfred Spraul <> | Subject | [PATCH 1/7] ipc/sem.c: Remove smp_rmb() from complexmode_enter() | Date | Thu, 1 Sep 2016 17:04:11 +0200 |
| |
complexmode_enter() contains an smp_rmb() after spin_unlock_wait(). This was done to allow safe backporting.
Commit 2c6100227116 ("locking/qspinlock: Fix spin_unlock_wait() some more") (and the commits for the other archs) ensure that spin_unlock_wait() is an ACQUIRE. Therefore the smp_rmb() after spin_unlock_wait() can be removed.
Not for stable!
Signed-off-by: Manfred Spraul <manfred@colorfullife.com> --- ipc/sem.c | 8 -------- 1 file changed, 8 deletions(-)
diff --git a/ipc/sem.c b/ipc/sem.c index 5e318c5..6586e0a 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -290,14 +290,6 @@ static void complexmode_enter(struct sem_array *sma) sem = sma->sem_base + i; spin_unlock_wait(&sem->lock); } - /* - * spin_unlock_wait() is not a memory barriers, it is only a - * control barrier. The code must pair with spin_unlock(&sem->lock), - * thus just the control barrier is insufficient. - * - * smp_rmb() is sufficient, as writes cannot pass the control barrier. - */ - smp_rmb(); } /* -- 2.7.4
| |