summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMagnus Lindholm <linmag7@gmail.com>2026-10-10 16:24:31 +0200
committerMagnus Lindholm <linmag7@gmail.com>2026-10-18 00:44:44 +0200
commit32f4dd420d626f96128fcfeea2ab24760b4f21a6 (patch)
treeeba91d4421a6e313434bdb7a1856ad29dc954d3f /tools/perf/scripts/python
parentc0db730bf05eb3c10c1fae64b19f6913dce129fc (diff)
downloadlinux-32f4dd420d626f96128fcfeea2ab24760b4f21a6.tar.gz
linux-32f4dd420d626f96128fcfeea2ab24760b4f21a6.zip
alpha: fix the local TLB invalidate in flush_tlb_page()
flush_tlb_page() invalidates the calling CPU itself before asking the others, and gates that on current->active_mm. For a non-executable vma that means a targeted tbi(2, addr), which acts on the context currently loaded and is only guaranteed to invalidate the intended translations when the target mm's context is the loaded one. A lazy active_mm does not establish that, so as in ipi_flush_tlb_page() the target mm's stale translations can survive, and nothing forces the old ASN to be retired afterwards. Test current->mm instead. A lazy caller then takes the flush_tlb_other() branch added by the previous patch, retiring its local context. Adding that branch first preserves the local invalidate at every step, including on EV7 where a targeted tbi() against a foreign ASN appeared to work. Which callers reach here with a foreign mm depends on the configuration. folio_mkclean(), from the writeback flusher kworker that has no mm of its own, accounted for about half the calls during writeback of a shared mapping and none at all on anonymous memory. Those counts were measured with CONFIG_COMPACTION=n: with COMPACTION=y, asm/pgtable.h overrides ptep_clear_flush() to call migrate_flush_tlb_page(), which rendezvouses with every CPU and handles the context itself, so folio_mkclean() does not reach this function. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Magnus Lindholm <linmag7@gmail.com> Link: https://lore.kernel.org/r/20261010142533.974797-6-linmag7@gmail.com Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions