[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio |
Date: |
Mon, 22 Feb 2010 17:08:48 +0200 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Mon, Feb 22, 2010 at 05:08:00PM +0200, Avi Kivity wrote:
> On 02/22/2010 04:57 PM, Michael S. Tsirkin wrote:
>>
>>
>>>> There is no need (for this case). Older read cannot be reordered with
>>>> write, writes are not reordered with other writes, writes by a single
>>>> processor are observed in the same order by all processors.
>>>>
>>>>
>>> Well, Linux does use sfence.
>>>
>> At least on 64 bit it doesnt.
>>
>
> Right, I was looking at wmb(), not smp_wmb().
>
>>> I imagine all arches need an instruction. For reads as well.
>>>
>>> Note, gcc has a __sync_synchronize() builtin that compiles to mfence on
>>> x86. We might use that as a baseline for both rmb and wmb, and let each
>>> arch override it incrementally.
>>>
>> This it what my patch did. Note it only works well for recent gcc.
>>
>
> Do you know how recent?
IIRC 4.3 has broken implementation.
4.4 seems OK as far as I can tell.
> --
> error compiling committee.c: too many arguments to function
- [Qemu-devel] Re: [patch uq/master 1/2] virtio-pci: wake up iothread on VIRTIO_PCI_QUEUE_NOTIFY, (continued)
[Qemu-devel] [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio, Marcelo Tosatti, 2010/02/22
- [Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio, Avi Kivity, 2010/02/22
- [Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio, Marcelo Tosatti, 2010/02/22
- [Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio, Avi Kivity, 2010/02/22
- [Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio, Michael S. Tsirkin, 2010/02/22
- [Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio, Avi Kivity, 2010/02/22
- [Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio,
Michael S. Tsirkin <=
- [Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio, Avi Kivity, 2010/02/22
[Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio, Michael S. Tsirkin, 2010/02/22
[Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio, Marcelo Tosatti, 2010/02/22