From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
kvm@vger.kernel.org, Gleb Natapov <gleb@redhat.com>
Subject: [Qemu-devel] [PATCH 2/2] kvm: skip system call when msi route is unchanged
Date: Tue, 4 Jun 2013 14:52:35 +0300 [thread overview]
Message-ID: <1370346682-22970-2-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1370346682-22970-1-git-send-email-mst@redhat.com>
Some guests do a large number of mask/unmask
calls which currently trigger expensive route update
system calls.
Detect that route in unchanged and skip the system call.
Reported-by: "Zhanghaoyu (A)" <haoyu.zhang@huawei.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
kvm-all.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kvm-all.c b/kvm-all.c
index f119ce1..891722b 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1026,6 +1026,10 @@ static int kvm_update_routing_entry(KVMState *s,
continue;
}
+ if(!memcmp(entry, new_entry, sizeof *entry)) {
+ return 0;
+ }
+
*entry = *new_entry;
kvm_irqchip_commit_routes(s);
--
MST
next prev parent reply other threads:[~2013-06-04 11:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-04 11:52 [Qemu-devel] [PATCH 1/2] kvm: zero-initialize KVM_SET_GSI_ROUTING input Michael S. Tsirkin
2013-06-04 11:52 ` Michael S. Tsirkin [this message]
2013-06-05 13:00 ` Gleb Natapov
2013-06-05 14:02 ` Michael S. Tsirkin
2013-06-05 14:04 ` Gleb Natapov
2013-06-05 14:11 ` Michael S. Tsirkin
2013-06-05 14:12 ` Gleb Natapov
2013-06-05 14:19 ` Michael S. Tsirkin
2013-06-05 14:47 ` Gleb Natapov
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=1370346682-22970-2-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@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).