Re: [Qemu-devel] [PATCH] Add a memory barrier to DMA functions

2012-05-22 Thread Anthony Liguori
On 05/22/2012 07:03 AM, Michael S. Tsirkin wrote: On Tue, May 22, 2012 at 09:41:41PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2012-05-22 at 14:14 +0300, Michael S. Tsirkin wrote: The baseline is the laptop without kvm talking to the server. The TCP_STREAM test results are: It's not a good

Re: [Qemu-devel] [PATCH] Add a memory barrier to DMA functions

2012-05-22 Thread Benjamin Herrenschmidt
On Tue, 2012-05-22 at 15:03 +0300, Michael S. Tsirkin wrote: > I have a deja vu. Amos sent perf results when you argued about > exactly the same issue in guest virtio. Delta was small but > measureable. At the moment I have no free time or free hardware > to redo the same work all over again. It's

Re: [Qemu-devel] [PATCH] Add a memory barrier to DMA functions

2012-05-22 Thread Michael S. Tsirkin
On Tue, May 22, 2012 at 09:41:41PM +1000, Benjamin Herrenschmidt wrote: > On Tue, 2012-05-22 at 14:14 +0300, Michael S. Tsirkin wrote: > > > The baseline is the laptop without kvm talking to the server. The > > > TCP_STREAM test results are: > > > > It's not a good test. The thing most affecting t

Re: [Qemu-devel] [PATCH] Add a memory barrier to DMA functions

2012-05-22 Thread Benjamin Herrenschmidt
On Tue, 2012-05-22 at 14:14 +0300, Michael S. Tsirkin wrote: > > The baseline is the laptop without kvm talking to the server. The > > TCP_STREAM test results are: > > It's not a good test. The thing most affecting throughput results is > how > much CPU does you guest get. So as a minumum you need

Re: [Qemu-devel] [PATCH] Add a memory barrier to DMA functions

2012-05-22 Thread Michael S. Tsirkin
On Tue, May 22, 2012 at 05:17:39PM +1000, Benjamin Herrenschmidt wrote: > On Tue, 2012-05-22 at 14:34 +1000, Benjamin Herrenschmidt wrote: > > The emulated devices can run simultaneously with the guest, so > > we need to be careful with ordering of load and stores done by > > them to the guest syst

Re: [Qemu-devel] [PATCH] Add a memory barrier to DMA functions

2012-05-22 Thread Benjamin Herrenschmidt
On Tue, 2012-05-22 at 14:34 +1000, Benjamin Herrenschmidt wrote: > The emulated devices can run simultaneously with the guest, so > we need to be careful with ordering of load and stores done by > them to the guest system memory, which need to be observed in > the right order by the guest operating

Re: [Qemu-devel] [PATCH] Add a memory barrier to DMA functions

2012-05-21 Thread Benjamin Herrenschmidt
On Tue, 2012-05-22 at 14:34 +1000, Benjamin Herrenschmidt wrote: > So here's the latest try :-) I've kept is simple, I don't > add anything to map/unmap at this stage, so we might still > have a problem with drivers who do that a lot without any > explicit barrier (ahci ?). My preference is to also