Thread (34 messages) 34 messages, 9 authors, 2016-11-25

Re: [PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()

From: Mark Rutland <mark.rutland@arm.com>
Date: 2016-11-25 16:33:12
Also in: kvm, lkml

On Fri, Nov 25, 2016 at 05:17:09PM +0100, Peter Zijlstra wrote:
On Fri, Nov 25, 2016 at 04:10:04PM +0000, Mark Rutland wrote:
quoted
On Fri, Nov 25, 2016 at 04:21:39PM +0100, Dmitry Vyukov wrote:
quoted
quoted
What are use cases for such primitive that won't be OK with "read once
_and_ atomically"?
I have none to hand.
Whatever triggers the __builtin_memcpy() paths, and even the size==8
paths on 32bit.
Lockref, per:

http://lkml.iu.edu/hypermail/linux/kernel/1503.3/02294.html

In that specific case, a torn value just means we'll retry until we get
a non torn value, due to the cmpxchg. For that case, all we need is the
value to be reloaded per invocation of READ_ONCE().

This guy seems to have the full story:

http://lkml.iu.edu/hypermail/linux/kernel/1503.3/02389.html
http://lkml.iu.edu/hypermail/linux/kernel/1503.3/02558.html

Thanks,
Mark.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help