KVM: x86/mmu: remove unnecessary flush_workqueue()
PATCH 1/1 KVM: x86/mmu: remove unnecessary flush_workqueue()
From: Lv Ruyi <[email protected]>
All work currently pending will be done first by calling destroy_workqueue, so there is unnecessary to flush it explicitly.
Reported-by Zeal Robot <[email protected]>
Signed-off-by Lv Ruyi <[email protected]>
--- arch/x86/kvm/mmu/tdp_mmu.c | 1 - 1 file changed, 1 deletion(-)
arch/x86/kvm/mmu/tdp_mmu.c +0 -1
@@ -51,7 +51,6 @@ void kvm_mmu_uninit_tdp_mmu(struct kvm *kvm)if (!kvm->arch.tdp_mmu_enabled)return ; -flush_workqueue (kvm->arch.tdp_mmu_zap_wq);destroy_workqueue (kvm->arch.tdp_mmu_zap_wq);WARN_ON (!list_empty (&kvm->arch.tdp_mmu_pages));
Signature · 1 line
2.25.1
Quoted 6 lines · On Fri, Apr 01, 2022, [email protected] wrote:
From: Lv Ruyi <[email protected]>
All work currently pending will be done first by calling
destroy_workqueue, so there is unnecessary to flush it explicitly.Reported-by Zeal Robot <[email protected]>
Good bot :-)
Quoted 10 lines
Signed-off-by Lv Ruyi <[email protected]>--- arch/x86/kvm/mmu/tdp_mmu.c | 1 - 1 file changed, 1 deletion(-)arch/x86/kvm/mmu/tdp_mmu.c +0
-0
arch/x86/kvm/mmu/tdp_mmu.c void kvm_mmu_uninit_tdp_mmu(struct kvm *kvm) · line 54
Quoted 4 lines
arch/x86/kvm/mmu/tdp_mmu.c +0
-1@@ -51,7 +51,6 @@ void kvm_mmu_uninit_tdp_mmu(struct kvm *kvm)if (!kvm->arch.tdp_mmu_enabled)return ; -flush_workqueue (kvm->arch.tdp_mmu_zap_wq);
Might be worth adding a comment calling out that this drains the queue. Either way,
Reviewed-by Sean Christopherson <[email protected]>
Queued, thanks.
Paolo