Skip to content

x86,tlb: context switch optimizations

Rik van Riel lkml 2 versions – Applied

Status from this message: The following commit has been merged into the x86/mm branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyApplied
  2. v13 patches 11 repliesApplied

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2x86,tlb: update mm_cpumask lazilyarch/x86/kernel/alternative.c arch/x86/mm/tlb.c+16 -131 reply
2/2x86,tlb: add tracepoint for TLB flush IPI to stale CPUarch/x86/mm/tlb.c include/linux/mm_types.h+2 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH 0/2 v2] x86,tlb: context switch optimizations

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.