Skip to content

SMP: Boot and CPU hotplug refactoring - Part 1

Thomas Gleixner linux-arch linux-hexagon lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest18 patches 56 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18m32r: Remove pointless function prototypesarch/m32r/kernel/smpboot.c+0 -41 reply
2/18smp: Add task_struct argument to __cpu_up()arch/alpha/kernel/smp.c arch/arm/kernel/smp.c arch/blackfin/mach-common/smp.c +18 more+23 -212 replies
3/18smp: Add generic smpboot facilitykernel/Makefile kernel/cpu.c kernel/smpboot.c +1 more+27 -03 replies
4/18smp: Provide generic idle thread allocationarch/Kconfig kernel/cpu.c kernel/sched/core.c +2 more+99 -15 replies
5/18x86: Add task_struct argument to smp_ops.cpu_uparch/x86/include/asm/smp.h arch/x86/kernel/smpboot.c arch/x86/xen/smp.c+7 -71 reply
6/18x86: Use generic idle thread allocationarch/x86/Kconfig arch/x86/include/asm/smp.h arch/x86/kernel/smpboot.c +1 more+14 -841 reply
7/18powerpc: Use generic idle thread allocationarch/powerpc/Kconfig arch/powerpc/kernel/smp.c+6 -692 replies
8/18ia64: Use generic idle thread allocationarch/ia64/Kconfig arch/ia64/kernel/smpboot.c+4 -581 reply
9/18arm: Use generic idle thread allocationarch/arm/Kconfig arch/arm/include/asm/cpu.h arch/arm/kernel/smp.c+2 -261 reply
10/18mips: Use generic idle thread allocationarch/mips/Kconfig arch/mips/kernel/smp.c+2 -531 reply
11/18hexagon: Use generic idle thread allocationarch/hexagon/Kconfig arch/hexagon/kernel/smp.c+3 -92 replies
12/18s390: Use generic idle thread allocationarch/s390/Kconfig arch/s390/kernel/smp.c+3 -312 replies
13/18blackfin: Use generic idle thread allocationarch/blackfin/Kconfig arch/blackfin/mach-common/smp.c+2 -181 reply
14/18cris: Use generic idle thread allocationarch/cris/Kconfig arch/cris/arch-v32/kernel/smp.c+3 -102 replies
15/18sh: Use generic idle thread allocationarch/sh/Kconfig arch/sh/include/asm/processor.h arch/sh/kernel/smp.c+2 -172 replies
16/18alpha: Use generic idle thread allocationarch/alpha/Kconfig arch/alpha/kernel/smp.c+3 -161 reply
17/18parisc: Use generic idle thread allocationarch/parisc/Kconfig arch/parisc/kernel/smp.c+3 -211 reply
18/18sparc: Use generic idle thread allocationarch/sparc/Kconfig arch/sparc/include/asm/leon.h arch/sparc/kernel/leon_smp.c +4 more+18 -322 replies

Reviews trailers per patch

6 of 18 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchVenkatesh PallipadiPaul MundtDavid S. MillerMartin SchwidefskyJesper NilssonRichard KuoFrank Rowand
SeriesA-b
1/18
2/18A-b
3/18
4/18A-b
5/18
6/18
7/18
8/18
9/18T-b
10/18
11/18A-b Acked-and-tested-by
12/18A-b A-b
13/18
14/18A-b A-b
15/18A-b A-b
16/18
17/18
18/18T-b T-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 7 reviewers.

Read the v1 thread

Cover letter [patch 00/18] SMP: Boot and CPU hotplug refactoring - Part 1

Dear all,

I'm working on refactoring the SMP boot and CPU hotplug implementation.

The current code has evolved over time into a conglomerate of warts. My main goals are to:

- reduce the architecture code by moving repeating constructs to the core

- redesigning the handling of per cpu threads. There is no point to tear down the threads just to create them again.

- restructuring the notifier facility into a proper tree with dependencies to avoid the gazillion of callbacks and moving setup/teardown code into the context of the upcoming/dying cpu

The motivation behind this work is the cpu hotplug nightmare which we are facing in the RT kernel and the requests from several groups (e.g. ARM) to make hotplug more lightweight and faster.

This first part moves the idle thread management for non-boot cpus into the core. fork_idle() is called in a workqueue as it is implemented in a few architectures already. This is necessary when not all cpus are brought up by the early boot code as otherwise we would take a ref on the user task VM of the thread which brings the cpu up via the sysfs interface.

This converts all architectures except m32r, mn10300, tile and UM to the new core facility. These architecture are calling fork_idle() in the very early boot code in smp_prepare_cpus() for unknown reasons. I haven't analyzed yet, whether this is on purpose or can be moved over to the generic facility. It'd be nice if the responsible maintainers could look into that as well.

Thanks,

tglx