Skip to content

x86/entry,lockdep: Improve IRQ state tracking

Peter Zijlstra lkml oe-kbuild-all 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 2 repliesIn review
  2. v16 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- this_cpu_inc_return() fix
- reordered patches
- fixed up changelogs
- fixed the actual NMI bits; we can't use IF on exit.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6x86/entry: Clarify irq_{enter,exit}_rcu()arch/x86/include/asm/idtentry.h kernel/softirq.c+13 -80 replies
2/6x86/entry: Rename trace_hardirqs_off_prepare()arch/x86/entry/common.c arch/x86/kernel/cpu/mce/core.c arch/x86/kernel/nmi.c +3 more+14 -140 replies
3/6lockdep: Change hardirq{s_enabled,_context} to per-cpu variablesinclude/linux/irqflags.h include/linux/lockdep.h include/linux/sched.h +3 more+52 -432 replies
4/6lockdep: Remove lockdep_hardirq{s_enabled,_context}() argumentinclude/linux/irqflags.h include/linux/lockdep.h kernel/locking/lockdep.c +2 more+23 -230 replies
5/6lockdep: Prepare for NMI IRQ state trackingkernel/locking/lockdep.c+30 -30 replies
6/6x86/entry: Fix NMI vs IRQ state trackingarch/x86/entry/common.c arch/x86/include/asm/idtentry.h arch/x86/kernel/nmi.c +2 more+69 -330 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/6] x86/entry,lockdep: Improve IRQ state tracking

Ahmed and Sebastian wanted additional lockdep_assert*() macros and ran into header hell.

Move the IRQ state into per-cpu variables, which removes the dependency on task_struct, which is what generated the header-hell.

And fix IRQ state tracking to not be affected by lockdep_off() (it really should not have been anyway) and extends IRQ state tracking across (x86) NMIs.

They now survive a kbuild+perf-top load.

Changes since v1:

- this_cpu_inc_return() fix
- reordered patches
- fixed up changelogs
- fixed the actual NMI bits; we can't use IF on exit.