From: Avi Kivity <avi@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
"mst@redhat.com" <mst@redhat.com>,
"gleb@redhat.com" <gleb@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 0/2] kvm: level irqfd and new eoifd
Date: Mon, 16 Jul 2012 17:35:34 +0300 [thread overview]
Message-ID: <500426B6.2010200@redhat.com> (raw)
In-Reply-To: <1342447433.3880.9.camel@ul30vt>
On 07/16/2012 05:03 PM, Alex Williamson wrote:
>>
>> This is what I meant, except I forgot that we already do direct path for
>> MSI.
>
> Ok, vfio now does it for the unmask irqfd-line interface too. Except
> when we re-inject from eoifd we have to do the eventfd_signal from a
> work queue as we can't have nested eventfd_signals. We probably need to
> do some benchmarks to see if that re-injection path saves us anything vs
> letting hardware fire again.
If you do that you might as well proxy it in userspace. Yes the big
qemu lock will get in the way but we shouldn't code the kernel with the
expectation that userspace will be forever broken.
>
>> > For an MSI that seems to already provide direct
>> > injection.
>>
>> Ugh, even for a broadcast MSI into 254 vcpu guests. That's going to be
>> one slow interrupt.
>>
>> > For level we'll schedule_work, so that explains the overhead
>> > in that path, but it's not too dissimilar to a a threaded irq. vfio
>> > does something very similar, so there's a schedule_work both on inject
>> > and on eoi. I'll have to check whether anything prevents the unmask
>> > from the wait_queue function in vfio, that could be a significant chunk
>> > of the gap. Where's the custom poll function come into play? Thanks,
>>
>> So I don't understand where the gap comes from. The number of context
>> switches for kvm and vfio is the same, as long as both use MSI (and
>> either both use threaded irq or both don't).
>
> Right, we're not exactly apples to apples yet. Using threaded
> interrupts and work queue injection, vfio is a little slower. There's
> an extra work queue in that path vs kvm though. Using non-threaded
> interrupts and direct injection, vfio is faster. Once kvm moves to
> non-threaded interrupt handling, I expect we'll be pretty similar. My
> benchmarks are just rough estimates at this point as I'm both trying to
> work out lockdep and get some ballpark performance comparison. Thanks,
Okay. I'm not really interested in how the code compares today, but
whether there is something in vfio that prevents it achieving kvm
performance once it's completely optimized. Given the above, I don't
think there is.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2012-07-16 14:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 19:21 [PATCH v3 0/2] kvm: level irqfd and new eoifd Alex Williamson
2012-07-03 19:21 ` [PATCH v3 1/2] kvm: Extend irqfd to support level interrupts Alex Williamson
2012-07-03 19:21 ` [PATCH v3 2/2] kvm: KVM_EOIFD, an eventfd for EOIs Alex Williamson
2012-07-04 14:00 ` Michael S. Tsirkin
2012-07-05 4:24 ` Alex Williamson
2012-07-05 15:53 ` Michael S. Tsirkin
2012-07-09 20:35 ` Alex Williamson
2012-07-13 13:36 ` Michael S. Tsirkin
2012-07-11 9:53 ` [PATCH v3 0/2] kvm: level irqfd and new eoifd Avi Kivity
2012-07-11 10:18 ` Jan Kiszka
2012-07-11 10:49 ` Avi Kivity
2012-07-11 11:23 ` Jan Kiszka
2012-07-11 11:51 ` Avi Kivity
2012-07-11 19:57 ` Alex Williamson
2012-07-12 9:35 ` Avi Kivity
2012-07-12 16:19 ` Alex Williamson
2012-07-12 17:38 ` Alex Williamson
2012-07-15 10:09 ` Avi Kivity
2012-07-16 14:08 ` Alex Williamson
2012-07-15 8:33 ` Avi Kivity
2012-07-16 14:03 ` Alex Williamson
2012-07-16 14:35 ` Avi Kivity [this message]
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=500426B6.2010200@redhat.com \
--to=avi@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=gleb@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).