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

From: Gleb Natapov
Date: Thu Apr 04 2013 - 12:34:46 EST


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();
> > t2 = rdtsc();
> > } while ((t2 - t1) < GOAL);
> > printf("%s %d\n", test->name, (int)((t2 - t1) / iterations));
>
> So it's the number of cycles per run.
>
> That means translated my numbers are:
>
> MMIO: 4307
> PIO: 3658
> HCALL: 1756
>
> MMIO - PIO = 649
>
> which aligns roughly with your PV MMIO callback.
>
> My MMIO benchmark was to poke the LAPIC version register. That does go through instruction emulation, no?
>
It should and PIO 'in' or string also goes through the emulator.

--
Gleb.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/