[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access fun
From: |
Rusty Russell |
Subject: |
Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access function |
Date: |
Tue, 22 May 2012 13:49:47 +0930 |
User-agent: |
Notmuch/0.12 (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) |
On Tue, 22 May 2012 07:58:17 +1000, Benjamin Herrenschmidt <address@hidden>
wrote:
> On Mon, 2012-05-21 at 15:18 +0300, Michael S. Tsirkin wrote:
> > But I can also live with a global flag "latest_dma_read"
> > and on read we could do
> > if (unlikely(latest_dma_read))
> > smp_mb();
> >
> > if you really insist on it
> > though I do think it's inelegant.
>
> Again, why do you object on simply making the default accessors fully
> ordered ? Do you think it will be a measurable different in most cases ?
>
> Shouldn't we measure it first ?
Yes. It seems clear to me that qemu's default DMA operations should be
strictly ordered. It's just far easier to get right.
After that, we can get tricky with conditional barriers, and we can get
tricky with using special unordered variants in critical drivers, but I
really don't want to be chasing subtle SMP ordering problems in
production.
If you're working on ARM or PPC, "it works for x86" makes it *worse*,
not better, since you have fewer users to find bugs.
Cheers,
Rusty.
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, (continued)
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, Benjamin Herrenschmidt, 2012/05/21
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, Michael S. Tsirkin, 2012/05/21
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, Benjamin Herrenschmidt, 2012/05/21
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, Michael S. Tsirkin, 2012/05/21
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, Paolo Bonzini, 2012/05/21
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access function, Benjamin Herrenschmidt, 2012/05/21
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access function, Michael S. Tsirkin, 2012/05/21
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access function, Benjamin Herrenschmidt, 2012/05/21
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access function, Michael S. Tsirkin, 2012/05/22
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access function, Benjamin Herrenschmidt, 2012/05/21
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access function,
Rusty Russell <=
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, Anthony Liguori, 2012/05/21
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, Benjamin Herrenschmidt, 2012/05/21
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, Anthony Liguori, 2012/05/21
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, Michael S. Tsirkin, 2012/05/21
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, Benjamin Herrenschmidt, 2012/05/21
- [Qemu-devel] [PATCH] Add a memory barrier to DMA functions, Benjamin Herrenschmidt, 2012/05/22
- Re: [Qemu-devel] [PATCH] Add a memory barrier to DMA functions, Benjamin Herrenschmidt, 2012/05/22
- Re: [Qemu-devel] [PATCH] Add a memory barrier to DMA functions, Benjamin Herrenschmidt, 2012/05/22
- Re: [Qemu-devel] [PATCH] Add a memory barrier to DMA functions, Michael S. Tsirkin, 2012/05/22
- Re: [Qemu-devel] [PATCH] Add a memory barrier to DMA functions, Benjamin Herrenschmidt, 2012/05/22