From: Asias He <asias.hejun@gmail.com>
To: Pekka Enberg <penberg@kernel.org>,
Cyrill Gorcunov <gorcunov@gmail.com>, Ingo Molnar <mingo@elte.hu>,
Sasha Levin <levinsasha928@gmail.com>,
Prasad Joshi <prasadjoshi124@gmail.com>
Cc: kvm@vger.kernel.org, Asias He <asias.hejun@gmail.com>
Subject: [PATCH 2/2] kvm tools: Respect VRING_AVAIL_F_NO_INTERRUPT
Date: Sat, 7 May 2011 10:34:20 +0800 [thread overview]
Message-ID: <1304735660-10844-2-git-send-email-asias.hejun@gmail.com> (raw)
In-Reply-To: <1304735660-10844-1-git-send-email-asias.hejun@gmail.com>
Do not inject IRQ when guest suppress it.
This can reduce IRQ injection further and bumps
host to guest bandwitdh to 6178.78 Mbps(cpu 63.96%).
Signed-off-by: Asias He <asias.hejun@gmail.com>
---
tools/kvm/virtio/core.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/tools/kvm/virtio/core.c b/tools/kvm/virtio/core.c
index 0734984..2b3503d 100644
--- a/tools/kvm/virtio/core.c
+++ b/tools/kvm/virtio/core.c
@@ -60,6 +60,9 @@ u16 virt_queue__get_iov(struct virt_queue *queue, struct iovec iov[], u16 *out,
void virt_queue__trigger_irq(struct virt_queue *vq, int irq, u8 *isr, struct kvm *kvm)
{
+ if (vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)
+ return;
+
if (*isr == VIRTIO_IRQ_LOW) {
*isr = VIRTIO_IRQ_HIGH;
kvm__irq_line(kvm, irq, VIRTIO_IRQ_HIGH);
--
1.7.4.4
next prev parent reply other threads:[~2011-05-07 2:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-07 2:34 [PATCH 1/2] kvm tools: Respect ISR status in virtio header Asias He
2011-05-07 2:34 ` Asias He [this message]
2011-05-07 7:55 ` [PATCH 2/2] kvm tools: Respect VRING_AVAIL_F_NO_INTERRUPT Ingo Molnar
2011-05-07 9:03 ` Pekka Enberg
2011-05-07 11:25 ` Asias He
2011-05-07 9:30 ` [PATCH 1/2] kvm tools: Respect ISR status in virtio header Ingo Molnar
2011-05-07 10:34 ` Sasha Levin
2011-05-07 10:39 ` Pekka Enberg
2011-05-07 10:39 ` Asias He
2011-05-07 11:15 ` Asias He
2011-05-07 14:00 ` Ingo Molnar
2011-05-07 14:24 ` Asias He
2011-05-07 13:14 ` Anthony Liguori
2011-05-07 14:02 ` Ingo Molnar
2011-05-07 14:21 ` Anthony Liguori
2011-05-07 14:47 ` Ingo Molnar
2011-05-07 14:52 ` Pekka Enberg
2011-05-07 14:55 ` Ingo Molnar
2011-05-07 14:50 ` Pekka Enberg
2011-05-07 15:01 ` Anthony Liguori
2011-05-07 15:02 ` Pekka Enberg
2011-05-07 15:06 ` Ingo Molnar
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=1304735660-10844-2-git-send-email-asias.hejun@gmail.com \
--to=asias.hejun@gmail.com \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=mingo@elte.hu \
--cc=penberg@kernel.org \
--cc=prasadjoshi124@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