Commit 3f483455 authored by Will Deacon's avatar Will Deacon Committed by Fuad Tabba
Browse files

ANDROID: KVM: arm64: Remove locking from EL2 allocation fast-paths



hyp_{get,put}_page() are called extensively from the page-table code
to adjust reference counts on page-table pages. As a small step towards
removing reader serialisation on these paths, drop the 'hyp_pool' lock
in the case where the refcount remains positive, only taking the lock
if the page is to be freed back to the allocator.

Remove a misleading comment at the same time, which implies that a page
with a refcount of zero and which is not attached to a freelist is
unsafe whereas in practice it's the other way around which can lead to
problems.

Cc: Quentin Perret <qperret@google.com>
Signed-off-by: default avatarWill Deacon <will@kernel.org>
Bug: 278749606
Change-Id: I249636d3bc993fd0c01038fc885e110849d0c414
parent b5dc2409
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment