diff options
author | Rik van Riel <riel@surriel.com> | 2025-03-19 20:25:20 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-03-19 23:56:42 +0300 |
commit | 0b7eb55cb706e92d6073e4ab63ccd4d219cf2cda (patch) | |
tree | b9019c69321ed206c823c2ccb9e244c5f594ef86 /tools/testing/selftests/bpf/prog_tests/access_variable_array.c | |
parent | de844ef582e3a5e0cbd429c68b6079eeb87394e5 (diff) | |
download | linux-0b7eb55cb706e92d6073e4ab63ccd4d219cf2cda.tar.xz |
x86/mm: Only do broadcast flush from reclaim if pages were unmapped
Track whether pages were unmapped from any MM (even ones with a currently
empty mm_cpumask) by the reclaim code, to figure out whether or not
broadcast TLB flush should be done when reclaim finishes.
The reason any MM must be tracked, and not only ones contributing to the
tlbbatch cpumask, is that broadcast ASIDs are expected to be kept up to
date even on CPUs where the MM is not currently active.
This change allows reclaim to avoid doing TLB flushes when only clean page
cache pages and/or slab memory were reclaimed, which is fairly common.
( This is a simpler alternative to the code that was in my INVLPGB series
before, and it seems to capture most of the benefit due to how common
it is to reclaim only page cache. )
Signed-off-by: Rik van Riel <riel@surriel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20250319132520.6b10ad90@fangorn
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/access_variable_array.c')
0 files changed, 0 insertions, 0 deletions