[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: |
Benjamin Herrenschmidt |
Subject: |
Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions |
Date: |
Mon, 21 May 2012 19:07:10 +1000 |
On Mon, 2012-05-21 at 18:58 +1000, Benjamin Herrenschmidt wrote:
> Except that you mostly don't know at that level what you can or cannot
> do, it depends on the caller. We should have the standard accessors do
> it the "safe" way and have performance sensitive stuff do map/unmap, at
> least that's the result of the discussions with Anthony.
>
> If we can address the virtqueue_map_sg problem, I think we should be
> good, I'll look at it tomorrow. Maybe the right way for now is to remove
> the barrier I added to "map" and only leave the one in _rw
One thing that might alleviate some of your concerns would possibly be
to "remember" in a global (to be replaced with a thread var eventually)
the last transfer direction and use a simple test to chose the barrier,
ie, store + store -> wmb, load + load -> rmb, other -> mb.
But first I'd be curious if some x86 folks could actually measure the
impact of the patch as I proposed it. That would give us an idea of how
bad the performance problem is and how far we need to go to address it.
Cheers,
Ben.
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, (continued)
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Paolo Bonzini, 2012/05/18
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Benjamin Herrenschmidt, 2012/05/18
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Paolo Bonzini, 2012/05/18
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Benjamin Herrenschmidt, 2012/05/18
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Paolo Bonzini, 2012/05/19
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Benjamin Herrenschmidt, 2012/05/20
- [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, Benjamin Herrenschmidt, 2012/05/20
- 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 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,
Benjamin Herrenschmidt <=
- 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, 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