[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ADF2A1B.3010205@gmail.com>
Date: Wed, 21 Oct 2009 11:34:51 -0400
From: Gregory Haskins <gregory.haskins@...il.com>
To: Gleb Natapov <gleb@...hat.com>
CC: Gregory Haskins <ghaskins@...ell.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org,
alacrityvm-devel@...ts.sourceforge.net
Subject: Re: [KVM PATCH 1/2] KVM: Directly inject interrupts via irqfd
Gleb Natapov wrote:
> On Wed, Oct 21, 2009 at 10:34:53AM -0400, Gregory Haskins wrote:
>> IRQFD currently uses a deferred workqueue item to execute the injection
>> operation. It was originally designed this way because kvm_set_irq()
>> required the caller to hold the irq_lock mutex, and the eventfd callback
>> is invoked from within a non-preemptible critical section.
>>
>> With the advent of lockless injection support in kvm_set_irq, the deferment
>> mechanism is no longer technically needed. Since context switching to the
>> workqueue is a source of interrupt latency, lets switch to a direct
>> method.
>>
> kvm_set_irq is fully lockless only in MSI case. IOAPIC/PIC has mutexes.
Right, but irqfd by design only works with MSI (or MSI like edge
triggers) anyway. Legacy-type injections follow a different path.
In any case, I didn't change the locking (you did ;). You recently
patched the irqfd code to remove the irq_lock, but we still had the
deferment mechanism in place to avoid the mutex_lock from within the
POLLIN callback. Since the mutex_lock is now no longer acquired in this
path, the deferment technique is not needed either. Its only adding
overhead for no purpose. So I am simply cleaning that up to improve
interrupt performance.
HTH,
-Greg
Download attachment "signature.asc" of type "application/pgp-signature" (268 bytes)
Powered by blists - more mailing lists