From c6d21f4fb6f8a32e5c1601e5dc6b50c3b72bac3b Mon Sep 17 00:00:00 2001 From: Conghui Date: Tue, 16 Aug 2022 15:53:46 +0800 Subject: [PATCH] virt: acrn: remove WQ_UNBOUND flag Due to the two level schedule model in type 1 hypervisor, Service OS kernel's scheduler does not aware the running status of the User VM, which means, a thread may be schedule to a CPU which is idle in Service OS but actually running in User VM. For the ioreq dispatch workqueue, as it was in the critical path of I/O request, and ACRN hypervisor only inject the ioreq interrupt to CPU0, so migrate to other CPU is meaningless and will bring more latency. So, remove the WQ_UNBOUND flag, and let CPU0 do the dispatch directly. Signed-off-by: Conghui Reviewed-by: Fei Li --- drivers/virt/acrn/ioreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virt/acrn/ioreq.c b/drivers/virt/acrn/ioreq.c index ce5a4852159f..4fdf92a89bc8 100644 --- a/drivers/virt/acrn/ioreq.c +++ b/drivers/virt/acrn/ioreq.c @@ -596,7 +596,7 @@ int acrn_ioreq_intr_setup(void) { acrn_setup_intr_handler(ioreq_intr_handler); ioreq_wq = alloc_workqueue("ioreq_wq", - WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 1); + WQ_HIGHPRI | WQ_MEM_RECLAIM, 1); if (!ioreq_wq) { dev_err(acrn_dev.this_device, "Failed to alloc workqueue!\n"); acrn_remove_intr_handler();