mm/vmscan: Maintain TLB coherency in LRU code

As a workaround (and possibly a fix) for CPU spins observed on BCM2837,
use ptep_clear_flush_young instead of ptep_test_and_clear_young inside
lru_gen_look_around in order to expose PTE changes to the MMU. Note that
on architectures that don't require an explicit flush,
ptep_clear_flush_young just calls ptep_test_and_clear_young.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
This commit is contained in:
Phil Elwell
2024-09-12 10:06:50 +01:00
committed by Dom Cobley
parent b7a0ec6f87
commit e1571d46ff

View File

@@ -4294,7 +4294,7 @@ bool lru_gen_look_around(struct page_vma_mapped_walk *pvmw)
if (!folio)
continue;
if (!ptep_clear_young_notify(vma, addr, pte + i))
if (!ptep_clear_flush_young_notify(vma, addr, pte + i))
continue;
if (last != folio) {