From: Avi Kivity <avi@redhat.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: How is irq delivered in kvm?
Date: Thu, 21 Apr 2011 17:11:58 +0300 [thread overview]
Message-ID: <4DB03B2E.1040607@redhat.com> (raw)
In-Reply-To: <BANLkTimXg0rvPBEunoi_DuSDf2S-g_x_BQ@mail.gmail.com>
On 04/21/2011 04:49 PM, Nguyen Thai Ngoc Duy wrote:
> Hi,
>
> I have a specialized e1000 device driver that expects to receive a
> single frame per interrupt, no more. It's by design and very hard to
> change (and it does not serve IP traffic). -net socket or tap can
> sometimes deliver more than one frame in a row and blow up the driver
> in turn. I'd like to experiment with tap/socket to only call
> qemu_send_packet..() once and leave pending frames in queue until next
> time, with hope that guest will have time to process the frame.
I don't understand how the driver can expect that. The card is free to
deliver multiple packets per interrupt. Are you counting on fast timing
to process the packet before the next packet arrives?
If you restrict the number of buffers you provide to the card to exactly
one, you'll get one packet per interrupts (and dropped packets).
> The problem is I'm new to kvm and not sure how the main loop is run.
> Will there be guest execution time between two tap/socket polls, how
> long is it? Or is guest run in parallel with the event loop and
> qemu_set_irq() somehow signals guest immediately?
The latter, it's in parallel.
Are you using qemu-kvm or qemu? qemu-kvm will deliver better interrupt
performance.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2011-04-21 14:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 13:49 How is irq delivered in kvm? Nguyen Thai Ngoc Duy
2011-04-21 14:11 ` Avi Kivity [this message]
2011-04-21 14:23 ` Nguyen Thai Ngoc Duy
2011-04-21 15:01 ` Avi Kivity
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=4DB03B2E.1040607@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pclouds@gmail.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).