Commit b0908eee authored by Daniel Jordan's avatar Daniel Jordan Committed by Xie XiuQi
Browse files

vfio: parallelize vfio_pin_map_dma



hulk inclusion
category: feature
bugzilla: 13228
CVE: NA
---------------------------

When starting a large-memory kvm guest, it takes an excessively long
time to start the boot process because qemu must pin all guest pages to
accommodate DMA when VFIO is in use.  Currently just one CPU is
responsible for the page pinning, which usually boils down to page
clearing time-wise, so the ways to optimize this are buying a faster
CPU ;-) or using more of the CPUs you already have.

Parallelize with ktask.  Refactor so workqueue workers pin with the mm
of the calling thread, and to enable an undo callback for ktask to
handle errors during page pinning.

Performance results appear later in the series.

Signed-off-by: default avatarDaniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: default avatarHongbo Yao <yaohongbo@huawei.com>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Tested-by: default avatarHongbo Yao <yaohongbo@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent cdc79c13
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment