Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'smp-core-2024-07-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull CPU hotplug updates from Thomas Gleixner:
"A small set of SMP/CPU hotplug updates:

- Reverse the order of iteration when freezing secondary CPUs for
hibernation.

This avoids that drivers like the Intel uncore performance counter
have to transfer the assignement of handling the per package uncore
events for every CPU in a package, which is a considerable speedup
on larger systems.

- Add a missing destroy_work_on_stack() invocation in
smp_call_on_cpu() to prevent debug objects to emit a false positive
warning when the stack is freed.

- Small cleanups in comments and a str_plural() conversion"

* tag 'smp-core-2024-07-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
smp: Add missing destroy_work_on_stack() call in smp_call_on_cpu()
cpu/hotplug: Reverse order of iteration in freeze_secondary_cpus()
smp: Use str_plural() to fix Coccinelle warnings
cpu/hotplug: Fix typo in comment

+6 -5
+1 -1
include/linux/cpuhotplug.h
··· 27 27 * startup callbacks sequentially from CPUHP_OFFLINE + 1 to CPUHP_ONLINE 28 28 * during a CPU online operation. During a CPU offline operation the 29 29 * installed teardown callbacks are invoked in the reverse order from 30 - * CPU_ONLINE - 1 down to CPUHP_OFFLINE. 30 + * CPUHP_ONLINE - 1 down to CPUHP_OFFLINE. 31 31 * 32 32 * The state space has three sections: PREPARE, STARTING and ONLINE. 33 33 *
+2 -2
kernel/cpu.c
··· 1894 1894 cpumask_clear(frozen_cpus); 1895 1895 1896 1896 pr_info("Disabling non-boot CPUs ...\n"); 1897 - for_each_online_cpu(cpu) { 1898 - if (cpu == primary) 1897 + for (cpu = nr_cpu_ids - 1; cpu >= 0; cpu--) { 1898 + if (!cpu_online(cpu) || cpu == primary) 1899 1899 continue; 1900 1900 1901 1901 if (pm_wakeup_pending()) {
+3 -2
kernel/smp.c
··· 25 25 #include <linux/nmi.h> 26 26 #include <linux/sched/debug.h> 27 27 #include <linux/jump_label.h> 28 + #include <linux/string_choices.h> 28 29 29 30 #include <trace/events/ipi.h> 30 31 #define CREATE_TRACE_POINTS ··· 983 982 num_nodes = num_online_nodes(); 984 983 num_cpus = num_online_cpus(); 985 984 pr_info("Brought up %d node%s, %d CPU%s\n", 986 - num_nodes, (num_nodes > 1 ? "s" : ""), 987 - num_cpus, (num_cpus > 1 ? "s" : "")); 985 + num_nodes, str_plural(num_nodes), num_cpus, str_plural(num_cpus)); 988 986 989 987 /* Any cleanup work */ 990 988 smp_cpus_done(setup_max_cpus); ··· 1119 1119 1120 1120 queue_work_on(cpu, system_wq, &sscs.work); 1121 1121 wait_for_completion(&sscs.done); 1122 + destroy_work_on_stack(&sscs.work); 1122 1123 1123 1124 return sscs.ret; 1124 1125 }