Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1348042
| From | Jianyu Zhan <nasa4836@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] futex: replace bare barrier() with a READ_ONCE() |
| Date | 2016-03-02 15:00 +0100 |
| Message-ID | <r8ftM-8on-5@gated-at.bofh.it> (permalink) |
| References | <r8eHo-80v-19@gated-at.bofh.it> <r8faq-8fn-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Mar 2, 2016 at 9:35 PM, Christian Borntraeger <borntraeger@de.ibm.com> wrote: > That change makes sense. I did the original barrier back in 2006 (could you cc me next time?) Sorry for that, I thought get_maintainer.pl would had spit the original author's email, but apparently it didn't :( > ACCESS_ONCE or READ_ONCE was not available at that time and its now the better way. > > This is not an s390 specific problem, it was just triggered there as the gcc cost model > considered the memory read as cheap as a register read. > Thanks for the clarification. > Maybe simplify the comment to something like > > /* Prevent the compiler to read lock_ptr twice (if and spin_lock) */ Will do. Regards, Jianyu Zhan
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] futex: replace bare barrier() with a READ_ONCE() Jianyu Zhan <nasa4836@gmail.com> - 2016-03-02 14:10 +0100
Re: [PATCH v2] futex: replace bare barrier() with a READ_ONCE() Christian Borntraeger <borntraeger@de.ibm.com> - 2016-03-02 14:40 +0100
Re: [PATCH v2] futex: replace bare barrier() with a READ_ONCE() Jianyu Zhan <nasa4836@gmail.com> - 2016-03-02 15:00 +0100
Re: [PATCH v2] futex: replace bare barrier() with a READ_ONCE() Darren Hart <dvhart@infradead.org> - 2016-03-02 17:50 +0100
Re: [PATCH v2] futex: replace bare barrier() with a READ_ONCE() Darren Hart <dvhart@infradead.org> - 2016-03-02 17:50 +0100
csiph-web