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
64 system. This is used to allocate some boot time memory for per_cpu variables
67 are added or removed anytime. Trimming it accurately for your system needs
78 Bitmap of CPUs currently present in the system. Not all
81 from the map depending on the event is hot-add/hot-remove. There are currently
85 You really don't need to manipulate any of the system CPU maps. They should
86 be read-only for most use. When setting up per-cpu resources almost always use
100 $ ls -lh /sys/devices/system/cpu
102 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu0
103 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu1
104 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu2
105 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu3
106 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu4
107 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu5
108 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu6
109 drwxr-xr-x 9 root root 0 Dec 21 16:33 cpu7
110 drwxr-xr-x 2 root root 0 Dec 21 16:33 hotplug
111 -r--r--r-- 1 root root 4.0K Dec 21 16:33 offline
112 -r--r--r-- 1 root root 4.0K Dec 21 16:33 online
113 -r--r--r-- 1 root root 4.0K Dec 21 16:33 possible
114 -r--r--r-- 1 root root 4.0K Dec 21 16:33 present
120 $ echo 0 > /sys/devices/system/cpu/cpu4/online
127 $ echo 1 > /sys/devices/system/cpu/cpu4/online
137 ----------------
158 -------------------------
166 callbacks of a state are set up or an instance is added to a multi-instance
172 removed from a multi-instance state.
175 operations (CPU online or CPU offline) then the other not-required callback
237 -----------------------------
242 [CPUHP_OFFLINE + 1]->startup() -> success
243 [CPUHP_OFFLINE + 2]->startup() -> success
244 [CPUHP_OFFLINE + 3] -> skipped because startup == NULL
246 [CPUHP_BRINGUP_CPU]->startup() -> success
248 [CPUHP_BRINGUP_CPU + 1]->startup() -> success
250 [CPUHP_AP_ONLINE]->startup() -> success
252 [CPUHP_AP_ONLINE + 1]->startup() -> success
254 [CPUHP_ONLINE - 1]->startup() -> success
260 [CPUHP_ONLINE - 1]->teardown() -> success
262 [CPUHP_AP_ONLINE + 1]->teardown() -> success
264 [CPUHP_AP_ONLINE]->teardown() -> success
266 [CPUHP_BRINGUP_ONLINE - 1]->teardown()
269 [CPUHP_BRINGUP_CPU]->teardown()
270 [CPUHP_OFFLINE + 3]->teardown()
271 [CPUHP_OFFLINE + 2] -> skipped because teardown == NULL
272 [CPUHP_OFFLINE + 1]->teardown()
278 [CPUHP_OFFLINE + 1]->startup() -> success
279 [CPUHP_OFFLINE + 2]->startup() -> success
280 [CPUHP_OFFLINE + 3] -> skipped because startup == NULL
282 [CPUHP_BRINGUP_CPU]->startup() -> success
284 [CPUHP_BRINGUP_CPU + 1]->startup() -> success
286 [CPUHP_AP_ONLINE]->startup() -> success
288 [CPUHP_AP_ONLINE + 1]->startup() -> success
289 ---
290 [CPUHP_AP_ONLINE + N]->startup() -> fail
291 [CPUHP_AP_ONLINE + (N - 1)]->teardown()
293 [CPUHP_AP_ONLINE + 1]->teardown()
295 [CPUHP_AP_ONLINE]->teardown()
297 [CPUHP_BRINGUP_ONLINE - 1]->teardown()
300 [CPUHP_BRINGUP_CPU]->teardown()
301 [CPUHP_OFFLINE + 3]->teardown()
302 [CPUHP_OFFLINE + 2] -> skipped because teardown == NULL
303 [CPUHP_OFFLINE + 1]->teardown()
309 [CPUHP_ONLINE - 1]->teardown() -> success
311 [CPUHP_ONLINE - N]->teardown() -> fail
312 [CPUHP_ONLINE - (N - 1)]->startup()
314 [CPUHP_ONLINE - 1]->startup()
321 [CPUHP_ONLINE - 1]->teardown() -> success
323 [CPUHP_ONLINE - N]->teardown() -> fail
324 [CPUHP_ONLINE - (N - 1)]->startup() -> success
325 [CPUHP_ONLINE - (N - 2)]->startup() -> fail
330 [CPUHP_ONLINE - (N - 1)]->teardown() -> success
331 [CPUHP_ONLINE - N]->teardown() -> fail
332 [CPUHP_ONLINE - (N - 1)]->startup() -> success
333 [CPUHP_ONLINE - (N - 2)]->startup() -> fail
334 [CPUHP_ONLINE - (N - 1)]->teardown() -> success
335 [CPUHP_ONLINE - N]->teardown() -> fail
339 [CPUHP_ONLINE - (N - 1)]
341 which at least lets the system make progress and gives the user a chance to
345 ------------------
378 ----------------------------
389 hotplug core provides multi-instance support. The advantage over driver
393 multi-instance state the following function is available:
398 constants for dynamically allocated states - CPUHP_BP_PREPARE_DYN,
399 CPUHP_AP_ONLINE_DYN - depending on the state section (PREPARE, ONLINE) for
451 0 .. N-1 is invoked to rollback the operation. The state setup fails,
470 multi-instance states the dynamically allocated state number is
478 ------------------------------
511 If a multi-instance state is removed then the caller has to remove all
514 Multi-Instance state instance management
515 ----------------------------------------
517 Once the multi-instance state is set up, instances can be added to the
527 instance's data structure. The pointer is handed to the multi-instance
534 multi-instance state's node list.
545 0 .. N-1 is invoked to rollback the operation, the function fails and
546 the instance is not added to the node list of the multi-instance state.
577 --------
606 Setup, use and teardown a dynamically allocated multi-instance state in the
613 ret = cpuhp_state_add_instance(state, &inst1->node);
617 ret = cpuhp_state_add_instance(state, &inst2->node);
621 cpuhp_remove_instance(state, &inst1->node);
623 cpuhp_remove_instance(state, &inst2->node);
637 All registered states are enumerated in ``/sys/devices/system/cpu/hotplug/states`` ::
639 $ tail /sys/devices/system/cpu/hotplug/states
643 141: acpi/cpu-drv:online
653 $ cat /sys/devices/system/cpu/cpu4/hotplug/state
655 $ echo 140 > /sys/devices/system/cpu/cpu4/hotplug/target
656 $ cat /sys/devices/system/cpu/cpu4/hotplug/state
662 $ echo 169 > /sys/devices/system/cpu/cpu4/hotplug/target
663 $ cat /sys/devices/system/cpu/cpu4/hotplug/state
668 # TASK-PID CPU# TIMESTAMP FUNCTION
670 bash-394 [001] 22.976: cpuhp_enter: cpu: 0004 target: 140 step: 169 (cpuhp_kick_ap_work)
671 cpuhp/4-31 [004] 22.977: cpuhp_enter: cpu: 0004 target: 140 step: 168 (sched_cpu_deactivate)
672 cpuhp/4-31 [004] 22.990: cpuhp_exit: cpu: 0004 state: 168 step: 168 ret: 0
673 cpuhp/4-31 [004] 22.991: cpuhp_enter: cpu: 0004 target: 140 step: 144 (mce_cpu_pre_down)
674 cpuhp/4-31 [004] 22.992: cpuhp_exit: cpu: 0004 state: 144 step: 144 ret: 0
675 …cpuhp/4-31 [004] 22.993: cpuhp_multi_enter: cpu: 0004 target: 140 step: 143 (virtnet_cpu_down_p…
676 cpuhp/4-31 [004] 22.994: cpuhp_exit: cpu: 0004 state: 143 step: 143 ret: 0
677 cpuhp/4-31 [004] 22.995: cpuhp_enter: cpu: 0004 target: 140 step: 142 (cacheinfo_cpu_pre_down)
678 cpuhp/4-31 [004] 22.996: cpuhp_exit: cpu: 0004 state: 142 step: 142 ret: 0
679 bash-394 [001] 22.997: cpuhp_exit: cpu: 0004 state: 140 step: 169 ret: 0
680 bash-394 [005] 95.540: cpuhp_enter: cpu: 0004 target: 169 step: 140 (cpuhp_kick_ap_work)
681 cpuhp/4-31 [004] 95.541: cpuhp_enter: cpu: 0004 target: 169 step: 141 (acpi_soft_cpu_online)
682 cpuhp/4-31 [004] 95.542: cpuhp_exit: cpu: 0004 state: 141 step: 141 ret: 0
683 cpuhp/4-31 [004] 95.543: cpuhp_enter: cpu: 0004 target: 169 step: 142 (cacheinfo_cpu_online)
684 cpuhp/4-31 [004] 95.544: cpuhp_exit: cpu: 0004 state: 142 step: 142 ret: 0
685 …cpuhp/4-31 [004] 95.545: cpuhp_multi_enter: cpu: 0004 target: 169 step: 143 (virtnet_cpu_online)
686 cpuhp/4-31 [004] 95.546: cpuhp_exit: cpu: 0004 state: 143 step: 143 ret: 0
687 cpuhp/4-31 [004] 95.547: cpuhp_enter: cpu: 0004 target: 169 step: 144 (mce_cpu_online)
688 cpuhp/4-31 [004] 95.548: cpuhp_exit: cpu: 0004 state: 144 step: 144 ret: 0
689 cpuhp/4-31 [004] 95.549: cpuhp_enter: cpu: 0004 target: 169 step: 145 (console_cpu_notify)
690 cpuhp/4-31 [004] 95.550: cpuhp_exit: cpu: 0004 state: 145 step: 145 ret: 0
691 cpuhp/4-31 [004] 95.551: cpuhp_enter: cpu: 0004 target: 169 step: 168 (sched_cpu_activate)
692 cpuhp/4-31 [004] 95.552: cpuhp_exit: cpu: 0004 state: 168 step: 168 ret: 0
693 bash-394 [005] 95.553: cpuhp_exit: cpu: 0004 state: 169 step: 140 ret: 0
726 …SUBSYSTEM=="cpu", DRIVERS=="processor", DEVPATH=="/devices/system/cpu/*", RUN+="the_hotplug_receiv…
744 When changes to the CPUs in the system occur, the sysfs file
745 /sys/devices/system/cpu/crash_hotplug contains '1' if the kernel
753 (i.e. the unload-then-reload to obtain a current list of CPUs), this sysfs
760 the unload-then-reload of the kdump capture kernel.
765 .. kernel-doc:: include/linux/cpuhotplug.h