Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1206098
| X-FeedAbuse | http://nntpfeed.proxad.net/abuse.pl feeded by 78.192.65.63 |
|---|---|
| Path | csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!proxad.net!feeder1-2.proxad.net!nntpfeed.proxad.net!news.muarf.org!news.ecp.fr!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod |
| From | Oleg Nesterov <oleg@redhat.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] ipc/sem.c: Update/correct memory barriers |
| Date | Wed, 12 Aug 2015 15:40:06 +0200 |
| Message-ID | <pWEqa-5Pp-69@gated-at.bofh.it> (permalink) |
| References | <pVD33-4W3-1@gated-at.bofh.it> |
| X-Original-To | Manfred Spraul <manfred@colorfullife.com> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.18 (2008-05-17) |
| X-Scanned-By | MIMEDefang 2.68 on 10.5.11.24 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 29 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Andrew Morton <akpm@linux-foundation.org>, LKML <linux-kernel@vger.kernel.org>, 1vier1@web.de, "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>, Peter Zijlstra <peterz@infradead.org>, Kirill Tkhai <ktkhai@parallels.com>, Ingo Molnar <mingo@redhat.com>, Josh Poimboeuf <jpoimboe@redhat.com>, stable@vger.kernel.org |
| X-Original-Date | Wed, 12 Aug 2015 15:31:10 +0200 |
| X-Original-Message-ID | <20150812133109.GA8266@redhat.com> |
| X-Original-References | <1439142939-2605-1-git-send-email-manfred@colorfullife.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1206098 |
Show key headers only | View raw
On 08/09, Manfred Spraul wrote: > > /* > + * spin_unlock_wait() and !spin_is_locked() are not memory barriers, they > + * are only control barriers. > + * The code must pair with spin_unlock(&sem->lock) or > + * spin_unlock(&sem_perm.lock), thus just the control barrier is insufficient. > + * > + * smp_rmb() is sufficient, as writes cannot pass the control barrier. > + */ > +#define ipc_smp_acquire__after_spin_is_unlocked() smp_rmb() Agreed. But to remind, this can have more users. In particular, task_work_run() which currently does mb() after spin_unlock_wait(). Can someone suggest a good "generic" name for this helper so that we can move it into include/linux/spinlock.h? Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] ipc/sem.c: Update/correct memory barriers Manfred Spraul <manfred@colorfullife.com> - 2015-08-09 20:00 +0200 Re: [PATCH] ipc/sem.c: Update/correct memory barriers Peter Zijlstra <peterz@infradead.org> - 2015-08-10 10:20 +0200 Re: [PATCH] ipc/sem.c: Update/correct memory barriers Oleg Nesterov <oleg@redhat.com> - 2015-08-12 15:40 +0200
csiph-web