]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: Move data barrier to end of split walk
authorColton Lewis <coltonlewis@google.com>
Thu, 8 Aug 2024 17:42:43 +0000 (17:42 +0000)
committerMarc Zyngier <maz@kernel.org>
Tue, 13 Aug 2024 18:25:38 +0000 (19:25 +0100)
commit38753cbc4dca431d4354319c7481f6bd1a212baf
tree0534d3caac84442c9737a749d87aa8704aaf3332
parent7c626ce4bae1ac14f60076d00eafe71af30450ba
KVM: arm64: Move data barrier to end of split walk

This DSB guarantees page table updates have been made visible to the
hardware table walker. Moving the DSB from stage2_split_walker() to
after the walk is finished in kvm_pgtable_stage2_split() results in a
roughly 70% reduction in Clear Dirty Log Time in
dirty_log_perf_test (modified to use eager page splitting) when using
huge pages. This gain holds steady through a range of vcpus
used (tested 1-64) and memory used (tested 1-64GB).

This is safe to do because nothing else is using the page tables while
they are still being mapped and this is how other page table walkers
already function. None of them have a data barrier in the walker
itself because relative ordering of table PTEs to table contents comes
from the release semantics of stage2_make_pte().

Signed-off-by: Colton Lewis <coltonlewis@google.com>
Acked-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240808174243.2836363-1-coltonlewis@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/hyp/pgtable.c