Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1592158
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE |
| Date | 2017-03-03 18:30 +0100 |
| Message-ID | <tgZbH-4pi-11@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <tgDbb-5KR-11@gated-at.bofh.it> <tgGLN-8cb-35@gated-at.bofh.it> <tgGLN-8cb-33@gated-at.bofh.it> <tgVB7-1Rv-7@gated-at.bofh.it> <tgYIG-3UX-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Mar 03, 2017 at 03:49:38PM +0100, Peter Zijlstra wrote: > On Fri, Mar 03, 2017 at 09:26:50AM +0100, Christian Borntraeger wrote: > > Right. The main purpose is to read/write _ONCE_. You can assume a somewhat > > atomic access for sizes <= word size. And there are certainly places that > > rely on that. But the *ONCE thing is mostly used for things where we used > > barrier() 10 years ago. > > A lot of code relies on READ/WRITE_ONCE() to generate single > instructions for naturally aligned machined word sized loads/stores > (something GCC used to guarantee, but does no longer IIRC). > > So much so that I would say its a bug if READ/WRITE_ONCE() doesn't > generate a single instruction under those conditions. > > However, every time I've tried to introduce stricter > semantics/primitives to verify things Linus hated it. See here for the last attempt: https://marc.info/?l=linux-virtualization&m=148007765918101&w=2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE Arnd Bergmann <arnd@arndb.de> - 2017-03-02 18:00 +0100
Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE Christian Borntraeger <borntraeger@de.ibm.com> - 2017-03-02 18:00 +0100
Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE Arnd Bergmann <arnd@arndb.de> - 2017-03-02 19:00 +0100
Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE Arnd Bergmann <arnd@arndb.de> - 2017-03-02 22:50 +0100
Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE Arnd Bergmann <arnd@arndb.de> - 2017-03-03 14:40 +0100
Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE Christian Borntraeger <borntraeger@de.ibm.com> - 2017-03-03 14:40 +0100
Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE Peter Zijlstra <peterz@infradead.org> - 2017-03-03 18:00 +0100
Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE Peter Zijlstra <peterz@infradead.org> - 2017-03-03 18:30 +0100
Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE Christian Borntraeger <borntraeger@de.ibm.com> - 2017-03-03 04:20 +0100
csiph-web