x86,tlb,mm: more lazy TLB cleanups & optimizations
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest11 patches 5 repliesIn review
- v110 patches 16 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | x86,tlb: clarify memory barrier in switch_mm_irqs_offarch/ | +5 | 0 replies | |
| 2/11 | smp: use __cpumask_set_cpu in on_each_cpu_condkernel/ | +1 | 0 replies | |
| 3/11 | smp,cpumask: introduce on_each_cpu_cond_maskinclude/ kernel/ kernel/ | +28 | 0 replies | |
| 4/11 | x86,mm: use on_each_cpu_cond for TLB flushesarch/ | +15 | 0 replies | |
| 5/11 | mm,tlb: turn dummy defines into inline functionsinclude/ | +7 | 0 replies | |
| 6/11 | mm,x86: skip cr4 and ldt reload when mm stays the samearch/ | +4 | 0 replies | |
| 7/11 | x86,mm: remove leave_mm cpu argumentarch/ arch/ arch/ +1 more | +4 | 0 replies | |
| 8/11 | arch,mm: add config variable to skip lazy TLB mm refcountingarch/ | +4 | 0 replies | |
| 9/11 | mm,x86: shoot down lazy TLB references at exit_mmap timearch/ arch/ arch/ +1 more | +19 | 0 replies | |
| 10/11 | x86,tlb: really leave mm on shootdownarch/ | +4 | 0 replies | |
| 11/11 | mm,sched: conditionally skip lazy TLB mm refcountingarch/ fs/ include/ +2 more | +64 | 5 replies |
Reviews trailers per patch
4 of 11 patches have a Reviewed-by or Acked-by.
| Patch | Andy Lutomirski | Peter Zijlstra (Intel) |
|---|---|---|
| 1/11 | R-b | |
| 2/11 | R-b | |
| 3/11 | ||
| 4/11 | ||
| 5/11 | ||
| 6/11 | A-b | |
| 7/11 | ||
| 8/11 | ||
| 9/11 | ||
| 10/11 | ||
| 11/11 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/11] x86,tlb,mm: more lazy TLB cleanups & optimizations
This patch series implements the cleanups suggested by Peter and Andy, removes lazy TLB mm refcounting on x86, and shows how other architectures could implement that same optimization.
The previous patch series already seems to have removed most of the cache line contention I was seeing at context switch time, so CPU use of the memcache and memcache-like workloads has not changed measurably with this patch series.
However, the memory bandwidth used by the memcache system has been reduced by about 1%, to serve the same number of queries per second.
This happens on two socket Haswell and Broadwell systems. Maybe on larger systems (4 or 8 socket) one might also see a measurable drop in the amount of CPU time used, with workloads where the previous patch series does not remove all cache line contention on the mm.
This is against the latest -tip tree, and seems to be stable (on top of another tree) with workloads that do over a million context switches a second.
V2 of the series uses Peter's logic flow in context_switch(), and is a step in the direction of completely getting rid of ->active_mm.