]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: clean up pi_wakeup_handler
authorLi RongQing <lirongqing@baidu.com>
Wed, 6 Apr 2022 11:25:02 +0000 (19:25 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 May 2022 13:51:40 +0000 (09:51 -0400)
commitc8d7a46ce4d3aa683b146283f4a7dfd5cd12f3b9
treeaad485cbd1d8089495bdb48365285b4575ca0fbe
parenteeb056d210dbb5c70ad6182943fd8165081aca80
KVM: VMX: clean up pi_wakeup_handler

Passing per_cpu() to list_for_each_entry() causes the macro to be
evaluated N+1 times for N sleeping vCPUs.  This is a very small
inefficiency, and the code is cleaner if the address of the per-CPU
variable is loaded earlier.  Do this for both the list and the spinlock.

Signed-off-by: Li RongQing <lirongqing@baidu.com>
Message-Id: <1649244302-6777-1-git-send-email-lirongqing@baidu.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/posted_intr.c