]> git.baikalelectronics.ru Git - kernel.git/commit
x86/kvm: Don't use pvqspinlock code if only 1 vCPU
authorWaiman Long <longman@redhat.com>
Tue, 17 Jul 2018 21:59:27 +0000 (17:59 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 6 Aug 2018 15:59:04 +0000 (17:59 +0200)
commitfe492a5cdd6e314784cf6fdc5db5f593e14c8a8b
tree336d0d26cfb9af7c6c0ef2c9ce7d835e2fcf1e7a
parent6887f46a2dc5ded783916686462baa54ba9ef7bf
x86/kvm: Don't use pvqspinlock code if only 1 vCPU

On a VM with only 1 vCPU, the locking fast path will always be
successful. In this case, there is no need to use the the PV qspinlock
code which has higher overhead on the unlock side than the native
qspinlock code.

Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kernel/kvm.c