Skip to content

init: Enable might_sleep() and smp_processor_id() debugging early

Thomas Gleixner linux-acpi linux-arm-kernel linux-iommu linux-metag linux-mm linuxppc-dev lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest17 patches 12 repliesIn review
  2. v118 patches 28 repliesSuperseded

Changes in v2 from the cover letter

- Use only one new state
- Enable both debug facilities right before scheduling starts
- Add more commentry about state ordering and placement of the state switch
- CC ACPI folks on the relevant patch and amend changelog.
- Collected acks/reviewed-by's

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17init: Pin init task to boot cpu initiallyinit/main.c+12 -51 reply
2/17arm: Adjust system_state checkarch/arm/kernel/smp.c+1 -20 replies
3/17arm64: Adjust system_state checkarch/arm64/kernel/smp.c+1 -22 replies
4/17x86/smp: Adjust system_state checkarch/x86/kernel/smpboot.c+1 -10 replies
5/17metag: Adjust system_state checkarch/metag/kernel/smp.c+1 -20 replies
6/17powerpc: Adjust system_state checkarch/powerpc/kernel/smp.c+1 -10 replies
7/17ACPI: Adjust system_state checkdrivers/acpi/pci_root.c+1 -11 reply
8/17mm: Adjust system_state checkdrivers/base/node.c+1 -10 replies
9/17cpufreq/pasemi: Adjust system_state checkdrivers/cpufreq/pasemi-cpufreq.c+1 -10 replies
10/17iommu/vt-d: Adjust system_state checksdrivers/iommu/intel-iommu.c+2 -20 replies
11/17iommu/of: Adjust system_state checkdrivers/iommu/of_iommu.c+1 -10 replies
12/17async: Adjust system_state checkskernel/async.c+4 -40 replies
13/17extable: Adjust system_state checkskernel/extable.c+1 -10 replies
14/17printk: Adjust system_state checkskernel/printk/printk.c+1 -10 replies
15/17mm/vmscan: Adjust system_state checksmm/vmscan.c+1 -11 reply
16/17init: Introduce SYSTEM_SCHEDULING statedrivers/xen/manage.c include/linux/kernel.h+6 -12 replies
17/17sched: Enable might_sleep() and smp_processor_id() checks earlyinit/main.c kernel/sched/core.c lib/smp_processor_id.c+14 -24 replies

Reviews trailers per patch

14 of 17 patches have a Reviewed-by or Acked-by.

PatchJoerg RoedelRobin MurphySteven Rostedt (VMware)Greg Kroah-HartmanMichael EllermanViresh KumarArjan van de VenVlastimil BabkaMark RutlandCatalin MarinasBoris Ostrovsky
1/17
2/17
3/17A-b A-b
4/17R-b
5/17
6/17A-b
7/17R-b
8/17A-b
9/17A-b
10/17A-b
11/17A-b A-b
12/17A-b
13/17R-b
14/17R-b
15/17R-b A-b
16/17A-b R-b
17/17A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 11 reviewers.

Read the v2 thread

Cover letter [patch V2 00/17] init: Enable might_sleep() and smp_processor_id() debugging early

We recentlty discovered a call path which takes a mutex from the low level secondary CPU bringup code and wondered why this was not caught by might_sleep().

The reason is that both debug facilities depend on system_state == SYSTEM_RUNNING, which is set after init memory is freed.

That means that SMP bootup and builtin driver initialization are not covered by these checks at all.

The patch series addresses this by adding an intermediate state which enables both debug features right when scheduling starts, i.e. the boot CPU idle task schedules the first time.

Changes since V1:
- Use only one new state
- Enable both debug facilities right before scheduling starts
- Add more commentry about state ordering and placement of the state switch
- CC ACPI folks on the relevant patch and amend changelog.
- Collected acks/reviewed-by's

Thanks,

tglx