|
|
a48aee |
From 3eae2edd136540898f8e51546eedfb56729f938d Mon Sep 17 00:00:00 2001
|
|
|
a48aee |
From: Xiao Liang <xiliang@redhat.com>
|
|
|
a48aee |
Date: Thu, 18 Oct 2018 21:50:33 +0800
|
|
|
a48aee |
Subject: procinterrupts: check xen-dyn-event more flexible
|
|
|
a48aee |
|
|
|
a48aee |
In current /proc/interrupts, the 'xen-dyn-event' was split to 'xen-dyn -event'.
|
|
|
a48aee |
It causes interrupts not balanced inside xen guest.
|
|
|
a48aee |
|
|
|
a48aee |
Below result is without this patch:
|
|
|
a48aee |
70: 29 0 0 0 xen-dyn -event vif0-q0-tx
|
|
|
a48aee |
71: 120 0 0 0 xen-dyn -event vif0-q0-rx
|
|
|
a48aee |
72: 586350 0 0 0 xen-dyn -event vif0-q1-tx
|
|
|
a48aee |
73: 44 0 0 0 xen-dyn -event vif0-q1-rx
|
|
|
a48aee |
74: 19 0 0 0 xen-dyn -event vif0-q2-tx
|
|
|
a48aee |
75: 179 0 0 0 xen-dyn -event vif0-q2-rx
|
|
|
a48aee |
76: 67 0 0 0 xen-dyn -event vif0-q3-tx
|
|
|
a48aee |
77: 299637 0 0 0 xen-dyn -event vif0-q3-rx
|
|
|
a48aee |
|
|
|
a48aee |
Below result is with this patch:
|
|
|
a48aee |
[root@dhcp-3-194 ~]# grep vif0 /proc/interrupts
|
|
|
a48aee |
70: 30 0 0 0 xen-dyn -event vif0-q0-tx
|
|
|
a48aee |
71: 305 0 11 0 xen-dyn -event vif0-q0-rx
|
|
|
a48aee |
72: 586354 0 27 0 xen-dyn -event vif0-q1-tx
|
|
|
a48aee |
73: 49 7 5 0 xen-dyn -event vif0-q1-rx
|
|
|
a48aee |
74: 27 0 0 509373 xen-dyn -event vif0-q2-tx
|
|
|
a48aee |
75: 420 0 5 0 xen-dyn -event vif0-q2-rx
|
|
|
a48aee |
76: 179 0 38 0 xen-dyn -event vif0-q3-tx
|
|
|
a48aee |
77: 299803 281433 0 0 xen-dyn -event vif0-q3-rx
|
|
|
a48aee |
|
|
|
a48aee |
Signed-off-by: Xiao Liang <xiliang@redhat.com>
|
|
|
a48aee |
---
|
|
|
a48aee |
procinterrupts.c | 7 ++++++-
|
|
|
a48aee |
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
a48aee |
|
|
|
a48aee |
diff --git a/procinterrupts.c b/procinterrupts.c
|
|
|
a48aee |
index eb84a1c..ca9533b 100644
|
|
|
a48aee |
--- a/procinterrupts.c
|
|
|
a48aee |
+++ b/procinterrupts.c
|
|
|
a48aee |
@@ -167,6 +167,7 @@ GList* collect_full_irq_list()
|
|
|
a48aee |
|
|
|
a48aee |
while (!feof(file)) {
|
|
|
a48aee |
int number;
|
|
|
a48aee |
+ int is_xen_dyn = 0;
|
|
|
a48aee |
struct irq_info *info;
|
|
|
a48aee |
char *c;
|
|
|
a48aee |
char savedline[1024];
|
|
|
a48aee |
@@ -187,9 +188,13 @@ GList* collect_full_irq_list()
|
|
|
a48aee |
|
|
|
a48aee |
strncpy(savedline, line, sizeof(savedline));
|
|
|
a48aee |
irq_name = strtok_r(savedline, " ", &savedptr);
|
|
|
a48aee |
+ if (strstr(irq_name, "xen-dyn") != NULL)
|
|
|
a48aee |
+ is_xen_dyn = 1;
|
|
|
a48aee |
last_token = strtok_r(NULL, " ", &savedptr);
|
|
|
a48aee |
while ((p = strtok_r(NULL, " ", &savedptr))) {
|
|
|
a48aee |
irq_name = last_token;
|
|
|
a48aee |
+ if (strstr(irq_name, "xen-dyn") != NULL)
|
|
|
a48aee |
+ is_xen_dyn = 1;
|
|
|
a48aee |
last_token = p;
|
|
|
a48aee |
}
|
|
|
a48aee |
|
|
|
a48aee |
@@ -209,7 +214,7 @@ GList* collect_full_irq_list()
|
|
|
a48aee |
info = calloc(sizeof(struct irq_info), 1);
|
|
|
a48aee |
if (info) {
|
|
|
a48aee |
info->irq = number;
|
|
|
a48aee |
- if (strstr(irq_name, "xen-dyn-event") != NULL) {
|
|
|
a48aee |
+ if (strstr(irq_name, "-event") != NULL && is_xen_dyn == 1) {
|
|
|
a48aee |
info->type = IRQ_TYPE_VIRT_EVENT;
|
|
|
a48aee |
info->class = IRQ_VIRT_EVENT;
|
|
|
a48aee |
} else {
|
|
|
a48aee |
--
|
|
|
a48aee |
2.17.1
|
|
|
a48aee |
|