Thread (5 messages) 5 messages, 2 authors, 2010-01-27

Re: [PATCH] virtio: use smp_XX barriers

From: Avi Kivity <hidden>
Date: 2010-01-27 09:46:32

On 01/27/2010 11:36 AM, Michael S. Tsirkin wrote:
quoted
smp_mb() is used for processor-vs-processor ordering, which can't happen
on UP systems, but for process-vs-device, we must use mb().

(this shows up if running a UP guest on an SMP host).
     
Currently, yes. But virtio is not a real device.
Here's what I was really trying to improve: rmb() is an lfence on
x86_64, but smp_rmb() is a barrier() and this is really sufficient for
virtio because x86_64 does not reorder memory reads.

   
x86_64 can do speculative and reordered reads.
Does this mean such an optimization would need a new macro?
   
Please no.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help