Skip to content

Commit

Permalink
mm/vmscan: Maintain TLB coherency in LRU code
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
pelwell authored and popcornmix committed Jan 2, 2025
1 parent af7d92d commit f92264b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -4113,7 +4113,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;

young++;
Expand Down

0 comments on commit f92264b

Please sign in to comment.