Skip to content

Commit 0a7ec60

Browse files
pelwellpopcornmix
authored andcommitted
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 <[email protected]>
1 parent 31f5e13 commit 0a7ec60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/vmscan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4095,7 +4095,7 @@ bool lru_gen_look_around(struct page_vma_mapped_walk *pvmw)
40954095
if (!folio)
40964096
continue;
40974097

4098-
if (!ptep_clear_young_notify(vma, addr, pte + i))
4098+
if (!ptep_clear_flush_young_notify(vma, addr, pte + i))
40994099
continue;
41004100

41014101
young++;

0 commit comments

Comments
 (0)