Lines Matching +full:multi +full:- +full:system
16 Modern advances in system architectures have introduced advanced error
23 system execution path. Hence the need for CPU hotplug support in the
26 A more novel use of CPU-hotplug support is its use today in suspend resume
27 support for SMP. Dual-core and HT support makes even a laptop run SMP kernels
58 system. This is used to allocate some boot time memory for per_cpu variables
61 are added or removed anytime. Trimming it accurately for your system needs
72 Bitmap of CPUs currently present in the system. Not all
75 from the map depending on the event is hot-add/hot-remove. There are currently
79 You really don't need to manipulate any of the system CPU maps. They should
80 be read-only for most use. When setting up per-cpu resources almost always use
94 $ ls -lh /sys/devices/system/cpu
96 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu0
97 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu1
98 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu2
99 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu3
100 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu4
101 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu5
102 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu6
103 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu7
104 drwxr-xr-x 2 root root 0 Dec 21 16:33 hotplug
105 -r--r--r-- 1 root root 4.0K Dec 21 16:33 offline
106 -r--r--r-- 1 root root 4.0K Dec 21 16:33 online
107 -r--r--r-- 1 root root 4.0K Dec 21 16:33 possible
108 -r--r--r-- 1 root root 4.0K Dec 21 16:33 present
114 $ echo 0 > /sys/devices/system/cpu/cpu4/online
121 $ echo 1 > /sys/devices/system/cpu/cpu4/online
131 ----------------
152 -------------------------
160 callbacks of a state are set up or an instance is added to a multi-instance
166 removed from a multi-instance state.
169 operations (CPU online or CPU offline) then the other not-required callback
231 -----------------------------
236 [CPUHP_OFFLINE + 1]->startup() -> success
237 [CPUHP_OFFLINE + 2]->startup() -> success
238 [CPUHP_OFFLINE + 3] -> skipped because startup == NULL
240 [CPUHP_BRINGUP_CPU]->startup() -> success
242 [CPUHP_BRINGUP_CPU + 1]->startup() -> success
244 [CPUHP_AP_ONLINE]->startup() -> success
246 [CPUHP_AP_ONLINE + 1]->startup() -> success
248 [CPUHP_ONLINE - 1]->startup() -> success
254 [CPUHP_ONLINE - 1]->teardown() -> success
256 [CPUHP_AP_ONLINE + 1]->teardown() -> success
258 [CPUHP_AP_ONLINE]->teardown() -> success
260 [CPUHP_BRINGUP_ONLINE - 1]->teardown()
263 [CPUHP_BRINGUP_CPU]->teardown()
264 [CPUHP_OFFLINE + 3]->teardown()
265 [CPUHP_OFFLINE + 2] -> skipped because teardown == NULL
266 [CPUHP_OFFLINE + 1]->teardown()
272 [CPUHP_OFFLINE + 1]->startup() -> success
273 [CPUHP_OFFLINE + 2]->startup() -> success
274 [CPUHP_OFFLINE + 3] -> skipped because startup == NULL
276 [CPUHP_BRINGUP_CPU]->startup() -> success
278 [CPUHP_BRINGUP_CPU + 1]->startup() -> success
280 [CPUHP_AP_ONLINE]->startup() -> success
282 [CPUHP_AP_ONLINE + 1]->startup() -> success
283 ---
284 [CPUHP_AP_ONLINE + N]->startup() -> fail
285 [CPUHP_AP_ONLINE + (N - 1)]->teardown()
287 [CPUHP_AP_ONLINE + 1]->teardown()
289 [CPUHP_AP_ONLINE]->teardown()
291 [CPUHP_BRINGUP_ONLINE - 1]->teardown()
294 [CPUHP_BRINGUP_CPU]->teardown()
295 [CPUHP_OFFLINE + 3]->teardown()
296 [CPUHP_OFFLINE + 2] -> skipped because teardown == NULL
297 [CPUHP_OFFLINE + 1]->teardown()
303 [CPUHP_ONLINE - 1]->teardown() -> success
305 [CPUHP_ONLINE - N]->teardown() -> fail
306 [CPUHP_ONLINE - (N - 1)]->startup()
308 [CPUHP_ONLINE - 1]->startup()
315 [CPUHP_ONLINE - 1]->teardown() -> success
317 [CPUHP_ONLINE - N]->teardown() -> fail
318 [CPUHP_ONLINE - (N - 1)]->startup() -> success
319 [CPUHP_ONLINE - (N - 2)]->startup() -> fail
324 [CPUHP_ONLINE - (N - 1)]->teardown() -> success
325 [CPUHP_ONLINE - N]->teardown() -> fail
326 [CPUHP_ONLINE - (N - 1)]->startup() -> success
327 [CPUHP_ONLINE - (N - 2)]->startup() -> fail
328 [CPUHP_ONLINE - (N - 1)]->teardown() -> success
329 [CPUHP_ONLINE - N]->teardown() -> fail
333 [CPUHP_ONLINE - (N - 1)]
335 which at least lets the system make progress and gives the user a chance to
339 ------------------
372 ----------------------------
383 hotplug core provides multi-instance support. The advantage over driver
387 multi-instance state the following function is available:
392 constants for dynamically allocated states - CPUHP_BP_PREPARE_DYN,
393 CPUHP_AP_ONLINE_DYN - depending on the state section (PREPARE, ONLINE) for
445 0 .. N-1 is invoked to rollback the operation. The state setup fails,
464 multi-instance states the dynamically allocated state number is
472 ------------------------------
505 If a multi-instance state is removed then the caller has to remove all
508 Multi-Instance state instance management
509 ----------------------------------------
511 Once the multi-instance state is set up, instances can be added to the
521 instance's data structure. The pointer is handed to the multi-instance
528 multi-instance state's node list.
539 0 .. N-1 is invoked to rollback the operation, the function fails and
540 the instance is not added to the node list of the multi-instance state.
571 --------
600 Setup, use and teardown a dynamically allocated multi-instance state in the
607 ret = cpuhp_state_add_instance(state, &inst1->node);
611 ret = cpuhp_state_add_instance(state, &inst2->node);
615 cpuhp_remove_instance(state, &inst1->node);
617 cpuhp_remove_instance(state, &inst2->node);
631 All registered states are enumerated in ``/sys/devices/system/cpu/hotplug/states`` ::
633 $ tail /sys/devices/system/cpu/hotplug/states
637 141: acpi/cpu-drv:online
647 $ cat /sys/devices/system/cpu/cpu4/hotplug/state
649 $ echo 140 > /sys/devices/system/cpu/cpu4/hotplug/target
650 $ cat /sys/devices/system/cpu/cpu4/hotplug/state
656 $ echo 169 > /sys/devices/system/cpu/cpu4/hotplug/target
657 $ cat /sys/devices/system/cpu/cpu4/hotplug/state
662 # TASK-PID CPU# TIMESTAMP FUNCTION
664 bash-394 [001] 22.976: cpuhp_enter: cpu: 0004 target: 140 step: 169 (cpuhp_kick_ap_work)
665 cpuhp/4-31 [004] 22.977: cpuhp_enter: cpu: 0004 target: 140 step: 168 (sched_cpu_deactivate)
666 cpuhp/4-31 [004] 22.990: cpuhp_exit: cpu: 0004 state: 168 step: 168 ret: 0
667 cpuhp/4-31 [004] 22.991: cpuhp_enter: cpu: 0004 target: 140 step: 144 (mce_cpu_pre_down)
668 cpuhp/4-31 [004] 22.992: cpuhp_exit: cpu: 0004 state: 144 step: 144 ret: 0
669 …cpuhp/4-31 [004] 22.993: cpuhp_multi_enter: cpu: 0004 target: 140 step: 143 (virtnet_cpu_down_p…
670 cpuhp/4-31 [004] 22.994: cpuhp_exit: cpu: 0004 state: 143 step: 143 ret: 0
671 cpuhp/4-31 [004] 22.995: cpuhp_enter: cpu: 0004 target: 140 step: 142 (cacheinfo_cpu_pre_down)
672 cpuhp/4-31 [004] 22.996: cpuhp_exit: cpu: 0004 state: 142 step: 142 ret: 0
673 bash-394 [001] 22.997: cpuhp_exit: cpu: 0004 state: 140 step: 169 ret: 0
674 bash-394 [005] 95.540: cpuhp_enter: cpu: 0004 target: 169 step: 140 (cpuhp_kick_ap_work)
675 cpuhp/4-31 [004] 95.541: cpuhp_enter: cpu: 0004 target: 169 step: 141 (acpi_soft_cpu_online)
676 cpuhp/4-31 [004] 95.542: cpuhp_exit: cpu: 0004 state: 141 step: 141 ret: 0
677 cpuhp/4-31 [004] 95.543: cpuhp_enter: cpu: 0004 target: 169 step: 142 (cacheinfo_cpu_online)
678 cpuhp/4-31 [004] 95.544: cpuhp_exit: cpu: 0004 state: 142 step: 142 ret: 0
679 …cpuhp/4-31 [004] 95.545: cpuhp_multi_enter: cpu: 0004 target: 169 step: 143 (virtnet_cpu_online)
680 cpuhp/4-31 [004] 95.546: cpuhp_exit: cpu: 0004 state: 143 step: 143 ret: 0
681 cpuhp/4-31 [004] 95.547: cpuhp_enter: cpu: 0004 target: 169 step: 144 (mce_cpu_online)
682 cpuhp/4-31 [004] 95.548: cpuhp_exit: cpu: 0004 state: 144 step: 144 ret: 0
683 cpuhp/4-31 [004] 95.549: cpuhp_enter: cpu: 0004 target: 169 step: 145 (console_cpu_notify)
684 cpuhp/4-31 [004] 95.550: cpuhp_exit: cpu: 0004 state: 145 step: 145 ret: 0
685 cpuhp/4-31 [004] 95.551: cpuhp_enter: cpu: 0004 target: 169 step: 168 (sched_cpu_activate)
686 cpuhp/4-31 [004] 95.552: cpuhp_exit: cpu: 0004 state: 168 step: 168 ret: 0
687 bash-394 [005] 95.553: cpuhp_exit: cpu: 0004 state: 169 step: 140 ret: 0
720 …SUBSYSTEM=="cpu", DRIVERS=="processor", DEVPATH=="/devices/system/cpu/*", RUN+="the_hotplug_receiv…
738 When changes to the CPUs in the system occur, the sysfs file
739 /sys/devices/system/cpu/crash_hotplug contains '1' if the kernel
748 (i.e. the unload-then-reload to obtain a current list of CPUs), this sysfs
755 kexec segments, then the rule skips the unload-then-reload of the kdump
761 .. kernel-doc:: include/linux/cpuhotplug.h