Skip to content

this_cpu_cmpxchg_double support

Christoph Lameter lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 11 repliesIn review
  2. v24 patches 39 repliesSuperseded
  3. v14 patches 24 repliesSuperseded

Changes in v3 from the cover letter

- Do not use CONFIG_DEBUG_VM to enable cmpxchg diagnostics. Use custom SLUB define instead.
- Add patch to move min_partial into a different cacheline.
- Rediff

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5slub: min_partial needs to be in first cachelineinclude/linux/slub_def.h+1 -10 replies
2/5slub: Get rid of slab_free_hook_irq()mm/slub.c+17 -121 reply
3/5Generic support for this_cpu_cmpxchg_doubleinclude/linux/percpu.h+130 -07 replies
4/5Lockless (and preemptless) fastpaths for slubinclude/linux/slub_def.h mm/slub.c+207 -33 replies
5/5x86: this_cpu_cmpxchg_double() supportarch/x86/include/asm/percpu.h arch/x86/lib/Makefile arch/x86/lib/cmpxchg16b_emu.S+111 -01 reply

Reviews trailers per patch

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

Read the v3 thread

Cover letter [cpuops cmpxchg double V3 0/5] this_cpu_cmpxchg_double support

This patch series introduces this_cpu_cmpxchg_double().

x86 cpus support cmpxchg16b and cmpxchg8b instuction which are capable of switching two words instead of one during a cmpxchg.
Two words allow to swap more state in an atomic instruction.

this_cpu_cmpxchg_double() is used in the slub allocator to avoid interrupt disable/enable in both alloc and free fastpath. Using the new operation significantly speeds up the fastpaths.

V1->V2
- Change parameter convention for this_cpu_cmpxchg_double. Specify both percpu variables in same way as the two old and new values.
- Do not require a per cpu pointer but a variable to conform to the convention used in other this_cpu_ops.

V2->V3:
- Do not use CONFIG_DEBUG_VM to enable cmpxchg diagnostics. Use custom SLUB define instead.
- Add patch to move min_partial into a different cacheline.
- Rediff