qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v9 18/27] virtio-blk: Call ioctl() directly instea


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [RFC v9 18/27] virtio-blk: Call ioctl() directly instead of irqfd
Date: Thu, 19 Jul 2012 12:19:23 +0300

On Thu, Jul 19, 2012 at 10:11:49AM +0100, Stefan Hajnoczi wrote:
> On Wed, Jul 18, 2012 at 4:40 PM, Michael S. Tsirkin <address@hidden> wrote:
> > On Wed, Jul 18, 2012 at 04:07:45PM +0100, Stefan Hajnoczi wrote:
> >> Optimize for the MSI-X enabled and vector unmasked case where it is
> >> possible to issue the KVM ioctl() directly instead of using irqfd.
> >
> > Why? Is an ioctl faster?
> 
> I have no benchmark results comparing irqfd against direct ioctl.  It
> would be interesting to know if this "optimization" is worthwhile and
> how much of a win it is.
> 
> The reasoning is that the irqfd code path signals an eventfd and then
> kvm.ko's poll handler injects the interrupt.  The ioctl calls straight
> into kvm.ko and skips the signalling/poll step.
> 
> Stefan

Polling is done in kernel so at least for MSI it's just a function call.
In fact ATM irqfd is more optimized.  Maybe it's faster for level IRQs
but do we really care?

-- 
MST



reply via email to

[Prev in Thread] Current Thread [Next in Thread]