blob: 2307d7b959c1d883ab96fe0fc65ad01578f00019 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
graphic: 0.978
debug: 0.965
semantic: 0.963
register: 0.960
hypervisor: 0.958
device: 0.958
socket: 0.957
virtual: 0.957
assembly: 0.956
TCG: 0.954
PID: 0.953
network: 0.952
arm: 0.952
performance: 0.950
peripherals: 0.950
permissions: 0.950
ppc: 0.950
user-level: 0.945
mistranslation: 0.942
architecture: 0.937
kernel: 0.935
VMM: 0.934
KVM: 0.934
vnc: 0.932
boot: 0.930
x86: 0.920
risc-v: 0.917
files: 0.889
i386: 0.751
KVM_EXIT_MMIO has increased in Qemu4.0.0 when compared to Qemu 2.11.0
I was able to generate trace dump in Qemu for kvm_run_exit event in both QEMU 2.11.0 and QEMU 4.0.0
From the trace i noticed that the number of KVM_KXIT_MMIO calls has increased alot and is causing delay in testcase execution.
I executed same testcase from Qemu 2.11 and Qemu4.
Inside Virtual machine when using qemu 2.11 testcase got completed in 11 seconds
but the same testcase when executed on Qemu 4.0.0 got executed in 26 seconds.
I did a bit of digging and extracted the kvm_run_exit to figure out whats going on.
Please find
Stats from Qemu2.11:
KVM_EXIT_UNKNOWN : 0
KVM_EXIT_EXCEPTION : 0
KVM_EXIT_IO : 182513
KVM_EXIT_HYPERCALL : 0
KVM_EXIT_DEBUG : 0
KVM_EXIT_HLT : 0
KVM_EXIT_MMIO : 216701
KVM_EXIT_IRQ_WINDOW_OPEN : 0
KVM_EXIT_SHUTDOWN : 0
KVM_EXIT_FAIL_ENTRY : 0
KVM_EXIT_INTR : 0
KVM_EXIT_SET_TPR : 0
KVM_EXIT_TPR_ACCESS : 0
KVM_EXIT_S390_SIEIC : 0
KVM_EXIT_S390_RESET : 0
KVM_EXIT_DCR : 0
KVM_EXIT_NMI : 0
KVM_EXIT_INTERNAL_ERROR : 0
KVM_EXIT_OSI : 0
KVM_EXIT_PAPR_HCALL : 0
KVM_EXIT_S390_UCONTROL : 0
KVM_EXIT_WATCHDOG : 0
KVM_EXIT_S390_TSCH : 0
KVM_EXIT_EPR : 0
KVM_EXIT_SYSTEM_EVENT : 0
KVM_EXIT_S390_STSI : 0
KVM_EXIT_IOAPIC_EOI : 0
KVM_EXIT_HYPERV : 0
KVM_RUN_EXIT : 399214 (Total in Qemu 2.11 for a testcase)
Stats For Qemu 4.0.0:
VM_EXIT_UNKNOWN : 0
KVM_EXIT_EXCEPTION : 0
KVM_EXIT_IO : 163729
KVM_EXIT_HYPERCALL : 0
KVM_EXIT_DEBUG : 0
KVM_EXIT_HLT : 0
KVM_EXIT_MMIO : 1094231
KVM_EXIT_IRQ_WINDOW_OPEN : 46
KVM_EXIT_SHUTDOWN : 0
KVM_EXIT_FAIL_ENTRY : 0
KVM_EXIT_INTR : 0
KVM_EXIT_SET_TPR : 0
KVM_EXIT_TPR_ACCESS : 0
KVM_EXIT_S390_SIEIC : 0
KVM_EXIT_S390_RESET : 0
KVM_EXIT_DCR : 0
KVM_EXIT_NMI : 0
KVM_EXIT_INTERNAL_ERROR : 0
KVM_EXIT_OSI : 0
KVM_EXIT_PAPR_HCALL : 0
KVM_EXIT_S390_UCONTROL : 0
KVM_EXIT_WATCHDOG : 0
KVM_EXIT_S390_TSCH : 0
KVM_EXIT_EPR : 0
KVM_EXIT_SYSTEM_EVENT : 0
KVM_EXIT_S390_STSI : 0
KVM_EXIT_IOAPIC_EOI : 464
KVM_EXIT_HYPERV : 0
KVM_RUN_EXIT : 1258470 (Total in qemu 4.0.0 for same testcase)
From above analysis i found that the number of KVM_EXIT_MMIO has increased by 4.x.
Could someone from qemu community help me understand as to why the MMIO exits have increased in qemu4 ?
The results i obtained are after running same testcase.
On Qemu2.11 testcase gets completed in : 11seconds
on Qemu4.11 testcase gets completed in : 26 seconds
VM Qcow2 used in Ubuntu 16.04
VM kernel OS is : 4.4 generic
Let me know incase more information is required .
Can you provide a link to the test case that you used? Otherwise, can you try to bisect the problem? Can you please also try with the latest version of QEMU? v4.0 is rather old already.
The testcase is a rather a very basic one.
Doing a mmap on a pcie device and triggering a read and write operation on the Virtual Address, which would in-turn trigger transaction requests on the host device.
I understand that Qemu v4.0 may be and old one, but the issue is that test case execution has become rather very slow with Qemu4.0.0 and the only thing i could notice from using tracebacks were related with increase in KVM_MMIO_EXIT when compared with Qemu2.11.0 version.
Can it be verified as to why the number of KVM_EXIT_MMIO has increased drastically in qemu4 when compared to Qemu2.11.0 ?
Could someone update on this?
One observation i made was that adding qemu arguments "-nic none" improved the testcase performance.
Does "-nic none" reduce KVM_EXIT_MMIO ?
Are there any other qemu arguments that can be used to improve qemu overall performance ?
|