Commit 7d9a027
KVM: Avoid synchronize_srcu() in kvm_io_bus_register_dev()
Device MMIO registration may happen quite frequently during VM boot,
and the SRCU synchronization each time has a measurable effect
on VM startup time. In our experiments it can account for around 25%
of a VM's startup time.
Replace the synchronization with a deferred free of the old kvm_io_bus
structure.
Tested-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Keir Fraser <keirf@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>1 parent 7788255 commit 7d9a027
2 files changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| 209 | + | |
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1320 | 1320 | | |
1321 | 1321 | | |
1322 | 1322 | | |
| 1323 | + | |
1323 | 1324 | | |
1324 | 1325 | | |
1325 | 1326 | | |
| |||
5952 | 5953 | | |
5953 | 5954 | | |
5954 | 5955 | | |
| 5956 | + | |
| 5957 | + | |
| 5958 | + | |
| 5959 | + | |
| 5960 | + | |
| 5961 | + | |
| 5962 | + | |
5955 | 5963 | | |
5956 | 5964 | | |
5957 | 5965 | | |
| |||
5990 | 5998 | | |
5991 | 5999 | | |
5992 | 6000 | | |
5993 | | - | |
5994 | | - | |
| 6001 | + | |
5995 | 6002 | | |
5996 | 6003 | | |
5997 | 6004 | | |
| |||
0 commit comments