[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B2FA8D4.3050206@gmail.com>
Date: Mon, 21 Dec 2009 11:56:52 -0500
From: Gregory Haskins <gregory.haskins@...il.com>
To: Avi Kivity <avi@...hat.com>
CC: Anthony Liguori <anthony@...emonkey.ws>,
Ingo Molnar <mingo@...e.hu>, kvm@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
torvalds@...ux-foundation.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
netdev@...r.kernel.org,
"alacrityvm-devel@...ts.sourceforge.net"
<alacrityvm-devel@...ts.sourceforge.net>
Subject: Re: [GIT PULL] AlacrityVM guest drivers for 2.6.33
On 12/21/09 11:40 AM, Avi Kivity wrote:
> On 12/21/2009 06:37 PM, Anthony Liguori wrote:
>> Since virtio-pci supports MSI-X, there should be no IO exits on
>> host->guest notification other than EOI in the virtual APIC. This is
>> a light weight exit today and will likely disappear entirely with
>> newer hardware.
>
> I'm working on disappearing EOI exits on older hardware as well. Same
> idea as the old TPR patching, without most of the magic.
>
While I applaud any engineering effort that results in more optimal
execution, if you are talking about what we have discussed in the past
its not quite in the same league as my proposal.
You are talking about the ability to optimize the final EOI if there are
no pending interrupts remaining, right? The problem with this approach
is it addresses the wrong side of the curve: That is, it optimizes the
code as its about to go io-idle. You still have to take an extra exit
for each injection during the heat of battle, which is when you actually
need it most.
To that front, what I have done is re-used the lockless shared-memory
concept for even "interrupt injection". Lockless shared-memory rings
have the property that both producer and consumer can simultaneously
manipulate the ring. So what we do in alacrityvm is deliver shm-signals
(shm-signal == "interrupt" in vbus) over a ring so that the host can
inject a signal to a running vcpu and a vcpu can complete an
ack/re-inject cycle directly from vcpu context. Therefore, we only need
a physical IDT injection when the vcpu is io-idle transitioning to
io-busy, and remain completely in parallel guest/host context until we
go idle again.
That said, your suggestion would play nicely with the above mentioned
scheme, so I look forward to seeing it in the tree. Feel free to send
me patches for testing.
Kind Regards,
-Greg
Download attachment "signature.asc" of type "application/pgp-signature" (268 bytes)
Powered by blists - more mailing lists