linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] send tlb_remove_table_smp_sync IPI only to necessary CPUs
@ 2023-06-20 14:46 Yair Podemsky
  2023-06-20 14:46 ` [PATCH v2 1/2] arch: Introduce ARCH_HAS_CPUMASK_BITS Yair Podemsky
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Yair Podemsky @ 2023-06-20 14:46 UTC (permalink / raw)
  To: mtosatti, ppandit, david, linux, mpe, npiggin, christophe.leroy,
	hca, gor, agordeev, borntraeger, svens, davem, tglx, mingo, bp,
	dave.hansen, hpa, keescook, paulmck, frederic, will, peterz, ardb,
	samitolvanen, juerg.haefliger, arnd, rmk+kernel, geert+renesas,
	linus.walleij, akpm, sebastian.reichel, rppt, aneesh.kumar, x86,
	linux-arm-kernel, linuxppc-dev, linux-s390, sparclinux,
	linux-arch, linux-mm, linux-kernel
  Cc: ypodemsk

Currently the tlb_remove_table_smp_sync IPI is sent to all CPUs
indiscriminately, this causes unnecessary work and delays notable in
real-time use-cases and isolated cpus.
By limiting the IPI to only be sent to cpus referencing the effected
mm.
a config to differentiate architectures that support mm_cpumask from
those that don't will allow safe usage of this feature.

changes from -v1:
- Previous version included a patch to only send the IPI to CPU's with
context_tracking in the kernel space, this was removed due to race 
condition concerns.
- for archs that do not maintain mm_cpumask the mask used should be
 cpu_online_mask (Peter Zijlstra).
 
 v1: https://lore.kernel.org/all/20230404134224.137038-1-ypodemsk@redhat.com/

Yair Podemsky (2):
  arch: Introduce ARCH_HAS_CPUMASK_BITS
  mm/mmu_gather: send tlb_remove_table_smp_sync IPI only to MM CPUs

 arch/Kconfig              |  8 ++++++++
 arch/arm/Kconfig          |  1 +
 arch/powerpc/Kconfig      |  1 +
 arch/s390/Kconfig         |  1 +
 arch/sparc/Kconfig        |  1 +
 arch/x86/Kconfig          |  1 +
 include/asm-generic/tlb.h |  4 ++--
 mm/khugepaged.c           |  4 ++--
 mm/mmu_gather.c           | 17 ++++++++++++-----
 9 files changed, 29 insertions(+), 9 deletions(-)

-- 
2.39.3



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-07-03 14:10 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-20 14:46 [PATCH v2 0/2] send tlb_remove_table_smp_sync IPI only to necessary CPUs Yair Podemsky
2023-06-20 14:46 ` [PATCH v2 1/2] arch: Introduce ARCH_HAS_CPUMASK_BITS Yair Podemsky
2023-06-20 14:46 ` [PATCH v2 2/2] mm/mmu_gather: send tlb_remove_table_smp_sync IPI only to MM CPUs Yair Podemsky
2023-06-21 17:42   ` Dave Hansen
2023-06-22 13:14     ` ypodemsk
2023-06-22 13:37       ` Dave Hansen
2023-06-26 14:36         ` ypodemsk
2023-06-26 15:23           ` Dave Hansen
2023-06-21 18:02   ` Nadav Amit
2023-06-22 13:57     ` ypodemsk
2023-06-23  3:38     ` Yang Shi
2023-07-03 13:57   ` Peter Zijlstra
2023-06-21  7:43 ` [PATCH v2 0/2] send tlb_remove_table_smp_sync IPI only to necessary CPUs Peter Zijlstra
2023-06-22 12:47   ` Marcelo Tosatti
2023-07-03 14:09     ` Peter Zijlstra
2023-06-22 13:11   ` ypodemsk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).