Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-07 Thread Christoffer Dall
On Sun, Apr 7, 2013 at 12:41 AM, Michael S. Tsirkin wrote: > On Thu, Apr 04, 2013 at 04:32:01PM -0700, Christoffer Dall wrote: >> [...] >> >> >> >> to give us some idea how much performance we would gain from each >> >> >> approach? Thoughput should be completely unaffected anyway, since >> >> >

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-07 Thread Michael S. Tsirkin
On Sun, Apr 07, 2013 at 12:30:38PM +0300, Gleb Natapov wrote: > On Thu, Apr 04, 2013 at 04:14:57PM +0300, Gleb Natapov wrote: > > > > > > > >>> is to move to MMIO only when PIO address space is exhausted. For PCI > > > >>> it > > > >>> will be never, for PCI-e it will be after ~16 devices. > > >

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-07 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 04:14:57PM +0300, Gleb Natapov wrote: > > > > > >>> is to move to MMIO only when PIO address space is exhausted. For PCI it > > >>> will be never, for PCI-e it will be after ~16 devices. > > >> > > >> Ok, let's go back a step here. Are you actually able to measure any > >

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-07 Thread Michael S. Tsirkin
On Thu, Apr 04, 2013 at 04:32:01PM -0700, Christoffer Dall wrote: > [...] > > >> >> to give us some idea how much performance we would gain from each > >> >> approach? Thoughput should be completely unaffected anyway, since > >> >> virtio just coalesces kicks internally. > >> > > >> > Latency is

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Christoffer Dall
[...] >> >> to give us some idea how much performance we would gain from each >> >> approach? Thoughput should be completely unaffected anyway, since virtio >> >> just coalesces kicks internally. >> > >> > Latency is dominated by the scheduling latency. >> > This means virtio-net is not the best

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 06:36:30PM +0300, Michael S. Tsirkin wrote: > > processor : 0 > > vendor_id : AuthenticAMD > > cpu family : 16 > > model : 8 > > model name : Six-Core AMD Opteron(tm) Processor 8435 > > stepping: 0 > > cpu MHz : 800.000 > > cache size : 5

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Michael S. Tsirkin
On Thu, Apr 04, 2013 at 05:36:40PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 15:33, Michael S. Tsirkin wrote: > > > On Thu, Apr 04, 2013 at 03:06:42PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 14:56, Gleb Natapov wrote: > >> > >>> On Thu, Apr 04, 2013 at 02:49:39PM +0200

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 05:36:40PM +0200, Alexander Graf wrote: > > > > #define GOAL (1ull << 30) > > > >do { > >iterations *= 2; > >t1 = rdtsc(); > > > >for (i = 0; i < iterations; ++i) > >func(); >

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Alexander Graf
On 04.04.2013, at 15:33, Michael S. Tsirkin wrote: > On Thu, Apr 04, 2013 at 03:06:42PM +0200, Alexander Graf wrote: >> >> On 04.04.2013, at 14:56, Gleb Natapov wrote: >> >>> On Thu, Apr 04, 2013 at 02:49:39PM +0200, Alexander Graf wrote: On 04.04.2013, at 14:45, Gleb Natapov wrote:

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Michael S. Tsirkin
On Thu, Apr 04, 2013 at 04:14:57PM +0300, Gleb Natapov wrote: > On Thu, Apr 04, 2013 at 03:06:42PM +0200, Alexander Graf wrote: > > > > On 04.04.2013, at 14:56, Gleb Natapov wrote: > > > > > On Thu, Apr 04, 2013 at 02:49:39PM +0200, Alexander Graf wrote: > > >> > > >> On 04.04.2013, at 14:45, Gl

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Michael S. Tsirkin
On Thu, Apr 04, 2013 at 04:02:57PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 14:58, Michael S. Tsirkin wrote: > > > On Thu, Apr 04, 2013 at 02:22:09PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 14:08, Gleb Natapov wrote: > >> > >>> On Thu, Apr 04, 2013 at 01:57:34PM +0200

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Michael S. Tsirkin
On Thu, Apr 04, 2013 at 03:06:42PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 14:56, Gleb Natapov wrote: > > > On Thu, Apr 04, 2013 at 02:49:39PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 14:45, Gleb Natapov wrote: > >> > >>> On Thu, Apr 04, 2013 at 02:39:51PM +0200, Alex

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Michael S. Tsirkin
On Thu, Apr 04, 2013 at 03:56:49PM +0300, Gleb Natapov wrote: > On Thu, Apr 04, 2013 at 02:49:39PM +0200, Alexander Graf wrote: > > > > On 04.04.2013, at 14:45, Gleb Natapov wrote: > > > > > On Thu, Apr 04, 2013 at 02:39:51PM +0200, Alexander Graf wrote: > > >> > > >> On 04.04.2013, at 14:38, Gl

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Michael S. Tsirkin
On Thu, Apr 04, 2013 at 02:39:51PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 14:38, Gleb Natapov wrote: > > > On Thu, Apr 04, 2013 at 02:32:08PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 14:08, Gleb Natapov wrote: > >> > >>> On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alex

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Michael S. Tsirkin
On Thu, Apr 04, 2013 at 02:32:08PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 14:08, Gleb Natapov wrote: > > > On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: > >> > >>> With KVM, MMIO is much slower than PIO,

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Alexander Graf
On 04.04.2013, at 14:58, Michael S. Tsirkin wrote: > On Thu, Apr 04, 2013 at 02:22:09PM +0200, Alexander Graf wrote: >> >> On 04.04.2013, at 14:08, Gleb Natapov wrote: >> >>> On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: On 04.04.2013, at 12:50, Michael S. Tsirkin w

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Michael S. Tsirkin
On Thu, Apr 04, 2013 at 02:22:09PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 14:08, Gleb Natapov wrote: > > > On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: > >> > >>> With KVM, MMIO is much slower than PIO,

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 03:06:42PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 14:56, Gleb Natapov wrote: > > > On Thu, Apr 04, 2013 at 02:49:39PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 14:45, Gleb Natapov wrote: > >> > >>> On Thu, Apr 04, 2013 at 02:39:51PM +0200, Alex

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Alexander Graf
On 04.04.2013, at 14:56, Gleb Natapov wrote: > On Thu, Apr 04, 2013 at 02:49:39PM +0200, Alexander Graf wrote: >> >> On 04.04.2013, at 14:45, Gleb Natapov wrote: >> >>> On Thu, Apr 04, 2013 at 02:39:51PM +0200, Alexander Graf wrote: On 04.04.2013, at 14:38, Gleb Natapov wrote:

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 02:49:39PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 14:45, Gleb Natapov wrote: > > > On Thu, Apr 04, 2013 at 02:39:51PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 14:38, Gleb Natapov wrote: > >> > >>> On Thu, Apr 04, 2013 at 02:32:08PM +0200, Alex

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Alexander Graf
On 04.04.2013, at 14:45, Gleb Natapov wrote: > On Thu, Apr 04, 2013 at 02:39:51PM +0200, Alexander Graf wrote: >> >> On 04.04.2013, at 14:38, Gleb Natapov wrote: >> >>> On Thu, Apr 04, 2013 at 02:32:08PM +0200, Alexander Graf wrote: On 04.04.2013, at 14:08, Gleb Natapov wrote:

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 02:39:51PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 14:38, Gleb Natapov wrote: > > > On Thu, Apr 04, 2013 at 02:32:08PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 14:08, Gleb Natapov wrote: > >> > >>> On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alex

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Alexander Graf
On 04.04.2013, at 14:38, Gleb Natapov wrote: > On Thu, Apr 04, 2013 at 02:32:08PM +0200, Alexander Graf wrote: >> >> On 04.04.2013, at 14:08, Gleb Natapov wrote: >> >>> On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: On 04.04.2013, at 12:50, Michael S. Tsirkin wrote:

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Alexander Graf
On 04.04.2013, at 14:34, Gleb Natapov wrote: > On Thu, Apr 04, 2013 at 02:22:09PM +0200, Alexander Graf wrote: >> >> On 04.04.2013, at 14:08, Gleb Natapov wrote: >> >>> On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: On 04.04.2013, at 12:50, Michael S. Tsirkin wrote:

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 02:32:08PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 14:08, Gleb Natapov wrote: > > > On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: > >> > >>> With KVM, MMIO is much slower than PIO,

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 02:22:09PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 14:08, Gleb Natapov wrote: > > > On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: > >> > >>> With KVM, MMIO is much slower than PIO,

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Alexander Graf
On 04.04.2013, at 14:08, Gleb Natapov wrote: > On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: >> >> On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: >> >>> With KVM, MMIO is much slower than PIO, due to the need to >>> do page walk and emulation. But with EPT, it does not hav

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Alexander Graf
On 04.04.2013, at 14:19, Gleb Natapov wrote: > On Thu, Apr 04, 2013 at 02:09:53PM +0200, Alexander Graf wrote: >> >> On 04.04.2013, at 13:04, Michael S. Tsirkin wrote: >> >>> On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: On 04.04.2013, at 12:50, Michael S. Tsirkin w

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Alexander Graf
On 04.04.2013, at 14:08, Gleb Natapov wrote: > On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: >> >> On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: >> >>> With KVM, MMIO is much slower than PIO, due to the need to >>> do page walk and emulation. But with EPT, it does not hav

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Michael S. Tsirkin
On Thu, Apr 04, 2013 at 02:09:53PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 13:04, Michael S. Tsirkin wrote: > > > On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: > >> > >>> With KVM, MMIO is much slower than

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 02:09:53PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 13:04, Michael S. Tsirkin wrote: > > > On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: > >> > >> On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: > >> > >>> With KVM, MMIO is much slower than

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Alexander Graf
On 04.04.2013, at 13:04, Michael S. Tsirkin wrote: > On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: >> >> On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: >> >>> With KVM, MMIO is much slower than PIO, due to the need to >>> do page walk and emulation. But with EPT, it does n

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: > > > With KVM, MMIO is much slower than PIO, due to the need to > > do page walk and emulation. But with EPT, it does not have to be: we > > know the address from the VMCS so if

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Michael S. Tsirkin
On Thu, Apr 04, 2013 at 01:57:34PM +0200, Alexander Graf wrote: > > On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: > > > With KVM, MMIO is much slower than PIO, due to the need to > > do page walk and emulation. But with EPT, it does not have to be: we > > know the address from the VMCS so if

Re: [PATCH RFC] kvm: add PV MMIO EVENTFD

2013-04-04 Thread Alexander Graf
On 04.04.2013, at 12:50, Michael S. Tsirkin wrote: > With KVM, MMIO is much slower than PIO, due to the need to > do page walk and emulation. But with EPT, it does not have to be: we > know the address from the VMCS so if the address is unique, we can look > up the eventfd directly, bypassing emu