From: Gregory Haskins <gregory.haskins@gmail.com>
To: Avi Kivity <avi@redhat.com>
Cc: Gregory Haskins <ghaskins@novell.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
alacrityvm-devel@lists.sourceforge.net
Subject: Re: [Alacrityvm-devel] [KVM PATCH v2 1/2] KVM: export lockless GSI attribute
Date: Wed, 28 Oct 2009 09:30:46 -0400 [thread overview]
Message-ID: <4AE84786.6090306@gmail.com> (raw)
In-Reply-To: <4AE846D6.6020505@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2247 bytes --]
Avi Kivity wrote:
> On 10/28/2009 03:19 PM, Gregory Haskins wrote:
>>> Yes, and it also contains the work_struct.
>>>
>>> What if we make the work_struct (and any additional state) part of the
>>> set_atomic() argument list? Does it simplify things?
>>>
>> Hmmm, that might not, but we could do a kmalloc(GFP_ATOMIC) for such
>> parameters. Considering this is just a safety net, perhaps this would
>> work fine.
>>
>
> Can't you simply pass the same work_struct from irqfd as we use now?
Well, yes, of course, but I am not sure that buys us much in terms of
generalizing the code. Unless I am misunderstanding, that would still
leave the impetus of the init/sync/cleanup to the irqfd code, at which
point we might as well just leave it entirely in irqfd anyway. Or am I
misunderstanding you?
>
>>>> So while generalizing this perhaps makes sense at some point,
>>>> especially
>>>> if irqfd-like interfaces get added, it probably doesn't make a ton of
>>>> sense to expend energy on it ATM. It is basically a generalization of
>>>> the irqfd deferrment code. Lets just wait until we have a user beyond
>>>> irqfd for now. Sound acceptable?
>>>>
>>>>
>>> I'll look at v3, but would really like to disentangle this.
>>>
>> Ok, I will see what I can do. I need at least a v4 to get rid of the
>> dependency on the now defunct v3:1/3 patch per yesterdays discussion.
>>
>
> There's another alternative - make ioapic and pic irq-safe by switching
> irq locking to spinlocks and using spin_lock_irqsave().
>
> I've long opposed this since the ioapic loops on all vcpus when
> injecting some irqs and this will increase irqoff times with large
> guests. But we don't have large guests now, and we need irq-safe
> injection in three places now:
>
> - irqfd
> - pit - we now signal vcpu0 to handle the injection, but this has its
> problems
> - device assignment
>
> so it may be better to have irq-safe injection, and deal with the loop
> later (would be good to have an idea how exactly).
Ok, perhaps I should just hold off on this series for now, then. I can
submit the original "assume atomic safe" once the path is fully lockless.
-Greg
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 267 bytes --]
next prev parent reply other threads:[~2009-10-28 13:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-23 2:38 [KVM PATCH v2 0/2] irqfd enhancements Gregory Haskins
2009-10-23 2:38 ` [KVM PATCH v2 1/2] KVM: export lockless GSI attribute Gregory Haskins
2009-10-23 2:43 ` Gregory Haskins
2009-10-25 14:30 ` Avi Kivity
2009-10-26 13:25 ` [Alacrityvm-devel] " Gregory Haskins
2009-10-26 15:38 ` Gregory Haskins
2009-10-28 10:04 ` Avi Kivity
2009-10-28 13:19 ` Gregory Haskins
2009-10-28 13:27 ` Avi Kivity
2009-10-28 13:30 ` Gregory Haskins [this message]
2009-10-23 2:38 ` [KVM PATCH v2 2/2] KVM: Directly inject interrupts if they support lockless operation Gregory Haskins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AE84786.6090306@gmail.com \
--to=gregory.haskins@gmail.com \
--cc=alacrityvm-devel@lists.sourceforge.net \
--cc=avi@redhat.com \
--cc=ghaskins@novell.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox