|
|
9ae3a8 |
From 34488aa0dd2c4c0a0dcc57a0557ec07750170f67 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Michael S. Tsirkin <mst@redhat.com>
|
|
|
9ae3a8 |
Date: Mon, 19 May 2014 09:57:40 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 2/2] kvm: skip system call when msi route is unchanged
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Michael S. Tsirkin <mst@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1400493448-29146-3-git-send-email-mst@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 58949
|
|
|
9ae3a8 |
O-Subject: [PATCH qemu-kvm RHEL7.1 2/2] kvm: skip system call when msi route is unchanged
|
|
|
9ae3a8 |
Bugzilla: 1098976
|
|
|
9ae3a8 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Alex Williamson <alex.williamson@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Some guests do a large number of mask/unmask
|
|
|
9ae3a8 |
calls which currently trigger expensive route update
|
|
|
9ae3a8 |
system calls.
|
|
|
9ae3a8 |
Detect that route in unchanged and skip the system call.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Reported-by: "Zhanghaoyu (A)" <haoyu.zhang@huawei.com>
|
|
|
9ae3a8 |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Gleb Natapov <gleb@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit 40509f7f52672fe41c2cce895e187352fc09f53a)
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
kvm-all.c | 4 ++++
|
|
|
9ae3a8 |
1 file changed, 4 insertions(+)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
kvm-all.c | 4 ++++
|
|
|
9ae3a8 |
1 files changed, 4 insertions(+), 0 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/kvm-all.c b/kvm-all.c
|
|
|
9ae3a8 |
index 592301a..f7f621b 100644
|
|
|
9ae3a8 |
--- a/kvm-all.c
|
|
|
9ae3a8 |
+++ b/kvm-all.c
|
|
|
9ae3a8 |
@@ -1008,6 +1008,10 @@ static int kvm_update_routing_entry(KVMState *s,
|
|
|
9ae3a8 |
continue;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
+ if(!memcmp(entry, new_entry, sizeof *entry)) {
|
|
|
9ae3a8 |
+ return 0;
|
|
|
9ae3a8 |
+ }
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
*entry = *new_entry;
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
kvm_irqchip_commit_routes(s);
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|