qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>,
	Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 2/2] virtio: enable msi-x for console+balloon
Date: Mon, 7 Dec 2009 15:03:29 +0200	[thread overview]
Message-ID: <20091207130329.GA3937@redhat.com> (raw)
In-Reply-To: <4B1CE5D2.5080205@redhat.com>

On Mon, Dec 07, 2009 at 12:24:02PM +0100, Gerd Hoffmann wrote:
> On 12/07/09 11:59, Michael S. Tsirkin wrote:
>>> The motivation was to move them away from the ioapic, to reduce irq
>>> sharing of *other* devices which are connected to the ioapic too (i.e.
>>> usb, e1000, lsi, ...)
>>
>> Let's convert these to MSI instead?
>> This will likely pay off long term,
>> e.g. with nested virtualization.
>
> Works only of the real hardware we emulate can do MSI-X too, otherwise  
> guests simply wouldn't use it.

Sure. Naturally, improving IRQ routing so that e.g. lsi
and usb do not share an interrupt would also be a good idea
regardless.
Also - why not simply use virtio? I assume you are talking about
guests with virtio support otherwise MSI support in virtio
won't matter for them.

> I think the only case where this could  
> work out is e1000, newer revisions can do MSI-X.  Maybe also the  
> upcoming megasas emulation Hannes is working on.

Hmm. I would expect high-end storage to support MSI-X as well.
Could you point me to linux drivers for devices we emulate
so that I can check?

>>> I'm aware that these are not performance-critical.  I've even tried to
>>> use 'vectors=1' because of that.  I expected that would make them use
>>> MSI-X, but a single IRQ line only.  Didn't work though.  Intentional?
>>
>> So it's even worse, we are using up 2 vectors per device? Ugh ...
>
> Yes.  Three for balloon, but that can easily changed to two.

Yes, please, make this change for 0.12.

>> no way to distinguish between vq interrupt
>> and config change. This last thing is important
>> because it allows fastpath injection of MSI
>> interrupts directly from kernel without
>> notifying qemu to update IRQ field.
>
> Ah, *that* is the reason for the separate config interrupt.  Does the  
> in-kernel injection matter for balloon+console?

No, but changing this will need updating guests.
And if we do update guests anyway, I would suggest that
we put IRQ field in guest memory, with an atomic set,
and guest would get it with test and clear, so that
we get a generic interface and not something
specific for console/baloon.
Naturally, this needs a feature bit, and it won't happen
in 0.12/2.6.33 timeframe.


> I'd expect only  
> virtio-net needs that when it is configured with vhost?
>
> cheers
>   Gerd

Any other device will need the same if it has
a kernel backend.

-- 
MST

  reply	other threads:[~2009-12-07 13:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25  8:16 [Qemu-devel] [PATCH 1/2] pc: add machine type for 0.12 Gerd Hoffmann
2009-11-25  8:16 ` [Qemu-devel] [PATCH 2/2] virtio: enable msi-x for console+balloon Gerd Hoffmann
2009-12-07  9:37   ` [Qemu-devel] " Michael S. Tsirkin
2009-12-07 10:32     ` Gerd Hoffmann
2009-12-07 10:59       ` Michael S. Tsirkin
2009-12-07 11:24         ` Gerd Hoffmann
2009-12-07 13:03           ` Michael S. Tsirkin [this message]
2009-12-07 13:16             ` Gerd Hoffmann
2009-12-07 14:13               ` Michael S. Tsirkin
2009-12-07 14:30                 ` Gerd Hoffmann
2009-12-07 14:43                   ` Michael S. Tsirkin

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=20091207130329.GA3937@redhat.com \
    --to=mst@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).