summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm
diff options
context:
space:
mode:
authorSteve Capper <steve.capper@arm.com>2018-09-21 16:34:05 +0100
committerWill Deacon <will.deacon@arm.com>2018-09-24 17:51:50 +0100
commit031e6e6b4e1277e76e73a6ab209095ad9bf3ce52 (patch)
tree2af3ea682365b27e9b4a520eb4202ce85fe5cd5c /arch/arm64/kvm
parent469ed9d823b7d240d6b9574f061ded7c3834c167 (diff)
downloadlinux-031e6e6b4e1277e76e73a6ab209095ad9bf3ce52.tar.bz2
arm64: hugetlb: Avoid unnecessary clearing in huge_ptep_set_access_flags
For contiguous hugetlb, huge_ptep_set_access_flags performs a get_clear_flush (which then flushes the TLBs) even when no change of ptes is necessary. Unfortunately, this behaviour can lead to back-to-back page faults being generated when running with multiple threads that access the same contiguous huge page. Thread 1 | Thread 2 -----------------------------+------------------------------ hugetlb_fault | huge_ptep_set_access_flags | -> invalidate pte range | hugetlb_fault continue processing | wait for hugetlb_fault_mutex release mutex and return | huge_ptep_set_access_flags | -> invalidate pte range hugetlb_fault ... This patch changes huge_ptep_set_access_flags s.t. we first read the contiguous range of ptes (whilst preserving dirty information); the pte range is only then invalidated where necessary and this prevents further spurious page faults. Fixes: d8bdcff28764 ("arm64: hugetlb: Add break-before-make logic for contiguous entries") Reported-by: Lei Zhang <zhang.lei@jp.fujitsu.com> Signed-off-by: Steve Capper <steve.capper@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kvm')
0 files changed, 0 insertions, 0 deletions