]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm/arm64: vgic: Improve sync_hwstate performance
authorChristoffer Dall <cdall@linaro.org>
Sat, 18 Mar 2017 12:48:42 +0000 (13:48 +0100)
committerChristoffer Dall <cdall@linaro.org>
Sun, 9 Apr 2017 14:49:12 +0000 (07:49 -0700)
commitd0b6e2fbbe09c80c5ee59ff4271fabf04836cb15
tree413557a35e5f60b5951c3b261cd8604383bd1089
parent615897a95efd3dd0162c81b41030d4ecc512279c
KVM: arm/arm64: vgic: Improve sync_hwstate performance

There is no need to call any functions to fold LRs when we don't use any
LRs and we don't need to mess with overflow flags, take spinlocks, or
prune the AP list if the AP list is empty.

Note: list_empty is a single atomic read (uses READ_ONCE) and can
therefore check if a list is empty or not without the need to take the
spinlock protecting the list.

Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
virt/kvm/arm/vgic/vgic-v2.c
virt/kvm/arm/vgic/vgic-v3.c
virt/kvm/arm/vgic/vgic.c