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
146 ----------------
167 -------------------------
175 callbacks of a state are set up or an instance is added to a multi-instance
181 removed from a multi-instance state.
184 operations (CPU online or CPU offline) then the other not-required callback
246 -----------------------------
251 [CPUHP_OFFLINE + 1]->startup() -> success
252 [CPUHP_OFFLINE + 2]->startup() -> success
253 [CPUHP_OFFLINE + 3] -> skipped because startup == NULL
255 [CPUHP_BRINGUP_CPU]->startup() -> success
257 [CPUHP_BRINGUP_CPU + 1]->startup() -> success
259 [CPUHP_AP_ONLINE]->startup() -> success
261 [CPUHP_AP_ONLINE + 1]->startup() -> success
263 [CPUHP_ONLINE - 1]->startup() -> success
269 [CPUHP_ONLINE - 1]->teardown() -> success
271 [CPUHP_AP_ONLINE + 1]->teardown() -> success
273 [CPUHP_AP_ONLINE]->teardown() -> success
275 [CPUHP_BRINGUP_ONLINE - 1]->teardown()
278 [CPUHP_BRINGUP_CPU]->teardown()
279 [CPUHP_OFFLINE + 3]->teardown()
280 [CPUHP_OFFLINE + 2] -> skipped because teardown == NULL
281 [CPUHP_OFFLINE + 1]->teardown()
287 [CPUHP_OFFLINE + 1]->startup() -> success
288 [CPUHP_OFFLINE + 2]->startup() -> success
289 [CPUHP_OFFLINE + 3] -> skipped because startup == NULL
291 [CPUHP_BRINGUP_CPU]->startup() -> success
293 [CPUHP_BRINGUP_CPU + 1]->startup() -> success
295 [CPUHP_AP_ONLINE]->startup() -> success
297 [CPUHP_AP_ONLINE + 1]->startup() -> success
298 ---
299 [CPUHP_AP_ONLINE + N]->startup() -> fail
300 [CPUHP_AP_ONLINE + (N - 1)]->teardown()
302 [CPUHP_AP_ONLINE + 1]->teardown()
304 [CPUHP_AP_ONLINE]->teardown()
306 [CPUHP_BRINGUP_ONLINE - 1]->teardown()
309 [CPUHP_BRINGUP_CPU]->teardown()
310 [CPUHP_OFFLINE + 3]->teardown()
311 [CPUHP_OFFLINE + 2] -> skipped because teardown == NULL
312 [CPUHP_OFFLINE + 1]->teardown()
318 [CPUHP_ONLINE - 1]->teardown() -> success
320 [CPUHP_ONLINE - N]->teardown() -> fail
321 [CPUHP_ONLINE - (N - 1)]->startup()
323 [CPUHP_ONLINE - 1]->startup()
330 [CPUHP_ONLINE - 1]->teardown() -> success
332 [CPUHP_ONLINE - N]->teardown() -> fail
333 [CPUHP_ONLINE - (N - 1)]->startup() -> success
334 [CPUHP_ONLINE - (N - 2)]->startup() -> fail
339 [CPUHP_ONLINE - (N - 1)]->teardown() -> success
340 [CPUHP_ONLINE - N]->teardown() -> fail
341 [CPUHP_ONLINE - (N - 1)]->startup() -> success
342 [CPUHP_ONLINE - (N - 2)]->startup() -> fail
343 [CPUHP_ONLINE - (N - 1)]->teardown() -> success
344 [CPUHP_ONLINE - N]->teardown() -> fail
348 [CPUHP_ONLINE - (N - 1)]
350 which at least lets the system make progress and gives the user a chance to
354 ------------------
387 ----------------------------
398 hotplug core provides multi-instance support. The advantage over driver
402 multi-instance state the following function is available:
407 constants for dynamically allocated states - CPUHP_PREPARE_DYN,
408 CPUHP_ONLINE_DYN - depending on the state section (PREPARE, ONLINE) for
460 0 .. N-1 is invoked to rollback the operation. The state setup fails,
479 multi-instance states the dynamically allocated state number is
487 ------------------------------
520 If a multi-instance state is removed then the caller has to remove all
523 Multi-Instance state instance management
524 ----------------------------------------
526 Once the multi-instance state is set up, instances can be added to the
536 instance's data structure. The pointer is handed to the multi-instance
543 multi-instance state's node list.
554 0 .. N-1 is invoked to rollback the operation, the function fails and
555 the instance is not added to the node list of the multi-instance state.
586 --------
615 Setup, use and teardown a dynamically allocated multi-instance state in the
622 ret = cpuhp_state_add_instance(state, &inst1->node);
626 ret = cpuhp_state_add_instance(state, &inst2->node);
630 cpuhp_remove_instance(state, &inst1->node);
632 cpuhp_remove_instance(state, &inst2->node);
646 All registered states are enumerated in ``/sys/devices/system/cpu/hotplug/states`` ::
648 $ tail /sys/devices/system/cpu/hotplug/states
652 141: acpi/cpu-drv:online
662 $ cat /sys/devices/system/cpu/cpu4/hotplug/state
664 $ echo 140 > /sys/devices/system/cpu/cpu4/hotplug/target
665 $ cat /sys/devices/system/cpu/cpu4/hotplug/state
671 $ echo 169 > /sys/devices/system/cpu/cpu4/hotplug/target
672 $ cat /sys/devices/system/cpu/cpu4/hotplug/state
677 # TASK-PID CPU# TIMESTAMP FUNCTION
679 bash-394 [001] 22.976: cpuhp_enter: cpu: 0004 target: 140 step: 169 (cpuhp_kick_ap_work)
680 cpuhp/4-31 [004] 22.977: cpuhp_enter: cpu: 0004 target: 140 step: 168 (sched_cpu_deactivate)
681 cpuhp/4-31 [004] 22.990: cpuhp_exit: cpu: 0004 state: 168 step: 168 ret: 0
682 cpuhp/4-31 [004] 22.991: cpuhp_enter: cpu: 0004 target: 140 step: 144 (mce_cpu_pre_down)
683 cpuhp/4-31 [004] 22.992: cpuhp_exit: cpu: 0004 state: 144 step: 144 ret: 0
684 …cpuhp/4-31 [004] 22.993: cpuhp_multi_enter: cpu: 0004 target: 140 step: 143 (virtnet_cpu_down_p…
685 cpuhp/4-31 [004] 22.994: cpuhp_exit: cpu: 0004 state: 143 step: 143 ret: 0
686 cpuhp/4-31 [004] 22.995: cpuhp_enter: cpu: 0004 target: 140 step: 142 (cacheinfo_cpu_pre_down)
687 cpuhp/4-31 [004] 22.996: cpuhp_exit: cpu: 0004 state: 142 step: 142 ret: 0
688 bash-394 [001] 22.997: cpuhp_exit: cpu: 0004 state: 140 step: 169 ret: 0
689 bash-394 [005] 95.540: cpuhp_enter: cpu: 0004 target: 169 step: 140 (cpuhp_kick_ap_work)
690 cpuhp/4-31 [004] 95.541: cpuhp_enter: cpu: 0004 target: 169 step: 141 (acpi_soft_cpu_online)
691 cpuhp/4-31 [004] 95.542: cpuhp_exit: cpu: 0004 state: 141 step: 141 ret: 0
692 cpuhp/4-31 [004] 95.543: cpuhp_enter: cpu: 0004 target: 169 step: 142 (cacheinfo_cpu_online)
693 cpuhp/4-31 [004] 95.544: cpuhp_exit: cpu: 0004 state: 142 step: 142 ret: 0
694 …cpuhp/4-31 [004] 95.545: cpuhp_multi_enter: cpu: 0004 target: 169 step: 143 (virtnet_cpu_online)
695 cpuhp/4-31 [004] 95.546: cpuhp_exit: cpu: 0004 state: 143 step: 143 ret: 0
696 cpuhp/4-31 [004] 95.547: cpuhp_enter: cpu: 0004 target: 169 step: 144 (mce_cpu_online)
697 cpuhp/4-31 [004] 95.548: cpuhp_exit: cpu: 0004 state: 144 step: 144 ret: 0
698 cpuhp/4-31 [004] 95.549: cpuhp_enter: cpu: 0004 target: 169 step: 145 (console_cpu_notify)
699 cpuhp/4-31 [004] 95.550: cpuhp_exit: cpu: 0004 state: 145 step: 145 ret: 0
700 cpuhp/4-31 [004] 95.551: cpuhp_enter: cpu: 0004 target: 169 step: 168 (sched_cpu_activate)
701 cpuhp/4-31 [004] 95.552: cpuhp_exit: cpu: 0004 state: 168 step: 168 ret: 0
702 bash-394 [005] 95.553: cpuhp_exit: cpu: 0004 state: 169 step: 140 ret: 0
735 …SUBSYSTEM=="cpu", DRIVERS=="processor", DEVPATH=="/devices/system/cpu/*", RUN+="the_hotplug_receiv…
756 .. kernel-doc:: include/linux/cpuhotplug.h