mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2 v2] x86,tlb: context switch optimizations
@ 2024-11-14 15:26 Rik van Riel
  2024-11-14 15:26 ` [PATCH 1/2] x86,tlb: update mm_cpumask lazily Rik van Riel
  2024-11-14 15:26 ` [PATCH 2/2] x86,tlb: add tracepoint for TLB flush IPI to stale CPU Rik van Riel
  0 siblings, 2 replies; 6+ messages in thread
From: Rik van Riel @ 2024-11-14 15:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: dave.hansen, luto, peterz, tglx, mingo, bp, x86, kernel-team, hpa

While profiling switch_mm_irqs_off with several workloads,
it appears there are two hot spots that probably don't need
to be there.

The patch placing the mm_cpumask test inside the prev == next
branch behind CONFIG_DEBUG_VM got merged into x86/mm already,
so here are the other two.

The approach used in v2 to ensure the call to flush_mm_tlb_range()
from __text_poke() remains a noop is to clear the CPU from the
mm_cpumask of poke_mm. Fix suggested by Peter Zijlstra.

That way the only thing flush_mm_tlb_range() really ends up
doing is increment the tlb_gen, resulting in future users of
poke_mm flushing the TLB.


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

end of thread, other threads:[~2024-11-19 12:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-14 15:26 [PATCH 0/2 v2] x86,tlb: context switch optimizations Rik van Riel
2024-11-14 15:26 ` [PATCH 1/2] x86,tlb: update mm_cpumask lazily Rik van Riel
2024-11-19 11:27   ` [tip: x86/mm] x86/mm/tlb: Update " tip-bot2 for Rik van Riel
2024-11-19 12:54     ` Peter Zijlstra
2024-11-14 15:26 ` [PATCH 2/2] x86,tlb: add tracepoint for TLB flush IPI to stale CPU Rik van Riel
2024-11-19 11:27   ` [tip: x86/mm] x86/mm/tlb: Add " tip-bot2 for Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®