|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module? |
Date: | Mon, 12 May 2014 15:02:03 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
Il 12/05/2014 14:53, Michael S. Tsirkin ha scritto:
> In any case, whether writes synchronize with RCU or bypass it > doesn't change the picture. In either case, writes are ordered > against each other but not against reads. RCU does nothing except > preventing dangling pointer accesses. > > PaoloThis is the only part I don't get. RCU will make sure no VCPUs are running, won't it? So it's a kind of full barrier.
The actual point where the new value becomes visible is where the write happens, not where you do synchronize_rcu. This is the same for both full-copy of the routing table or overwriting the entry.
However, the delay in servicing an older irqfd write can be arbitrary if the scheduler decides not to run the irqfd_inject thread. Such an older write might definitely read a newer routing entry. And that's the invalid scenario according to the PCI spec.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |