diff options
Diffstat (limited to 'Documentation/cpu-hotplug.txt')
-rw-r--r-- | Documentation/cpu-hotplug.txt | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt index a20bfd415e41..66ef8f35613d 100644 --- a/Documentation/cpu-hotplug.txt +++ b/Documentation/cpu-hotplug.txt | |||
@@ -47,7 +47,7 @@ maxcpus=n Restrict boot time cpus to n. Say if you have 4 cpus, using | |||
47 | other cpus later online, read FAQ's for more info. | 47 | other cpus later online, read FAQ's for more info. |
48 | 48 | ||
49 | additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets | 49 | additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets |
50 | cpu_possible_map = cpu_present_map + additional_cpus | 50 | cpu_possible_mask = cpu_present_mask + additional_cpus |
51 | 51 | ||
52 | cede_offline={"off","on"} Use this option to disable/enable putting offlined | 52 | cede_offline={"off","on"} Use this option to disable/enable putting offlined |
53 | processors to an extended H_CEDE state on | 53 | processors to an extended H_CEDE state on |
@@ -64,11 +64,11 @@ should only rely on this to count the # of cpus, but *MUST* not rely | |||
64 | on the apicid values in those tables for disabled apics. In the event | 64 | on the apicid values in those tables for disabled apics. In the event |
65 | BIOS doesn't mark such hot-pluggable cpus as disabled entries, one could | 65 | BIOS doesn't mark such hot-pluggable cpus as disabled entries, one could |
66 | use this parameter "additional_cpus=x" to represent those cpus in the | 66 | use this parameter "additional_cpus=x" to represent those cpus in the |
67 | cpu_possible_map. | 67 | cpu_possible_mask. |
68 | 68 | ||
69 | possible_cpus=n [s390,x86_64] use this to set hotpluggable cpus. | 69 | possible_cpus=n [s390,x86_64] use this to set hotpluggable cpus. |
70 | This option sets possible_cpus bits in | 70 | This option sets possible_cpus bits in |
71 | cpu_possible_map. Thus keeping the numbers of bits set | 71 | cpu_possible_mask. Thus keeping the numbers of bits set |
72 | constant even if the machine gets rebooted. | 72 | constant even if the machine gets rebooted. |
73 | 73 | ||
74 | CPU maps and such | 74 | CPU maps and such |
@@ -76,7 +76,7 @@ CPU maps and such | |||
76 | [More on cpumaps and primitive to manipulate, please check | 76 | [More on cpumaps and primitive to manipulate, please check |
77 | include/linux/cpumask.h that has more descriptive text.] | 77 | include/linux/cpumask.h that has more descriptive text.] |
78 | 78 | ||
79 | cpu_possible_map: Bitmap of possible CPUs that can ever be available in the | 79 | cpu_possible_mask: Bitmap of possible CPUs that can ever be available in the |
80 | system. This is used to allocate some boot time memory for per_cpu variables | 80 | system. This is used to allocate some boot time memory for per_cpu variables |
81 | that aren't designed to grow/shrink as CPUs are made available or removed. | 81 | that aren't designed to grow/shrink as CPUs are made available or removed. |
82 | Once set during boot time discovery phase, the map is static, i.e no bits | 82 | Once set during boot time discovery phase, the map is static, i.e no bits |
@@ -84,13 +84,13 @@ are added or removed anytime. Trimming it accurately for your system needs | |||
84 | upfront can save some boot time memory. See below for how we use heuristics | 84 | upfront can save some boot time memory. See below for how we use heuristics |
85 | in x86_64 case to keep this under check. | 85 | in x86_64 case to keep this under check. |
86 | 86 | ||
87 | cpu_online_map: Bitmap of all CPUs currently online. Its set in __cpu_up() | 87 | cpu_online_mask: Bitmap of all CPUs currently online. Its set in __cpu_up() |
88 | after a cpu is available for kernel scheduling and ready to receive | 88 | after a cpu is available for kernel scheduling and ready to receive |
89 | interrupts from devices. Its cleared when a cpu is brought down using | 89 | interrupts from devices. Its cleared when a cpu is brought down using |
90 | __cpu_disable(), before which all OS services including interrupts are | 90 | __cpu_disable(), before which all OS services including interrupts are |
91 | migrated to another target CPU. | 91 | migrated to another target CPU. |
92 | 92 | ||
93 | cpu_present_map: Bitmap of CPUs currently present in the system. Not all | 93 | cpu_present_mask: Bitmap of CPUs currently present in the system. Not all |
94 | of them may be online. When physical hotplug is processed by the relevant | 94 | of them may be online. When physical hotplug is processed by the relevant |
95 | subsystem (e.g ACPI) can change and new bit either be added or removed | 95 | subsystem (e.g ACPI) can change and new bit either be added or removed |
96 | from the map depending on the event is hot-add/hot-remove. There are currently | 96 | from the map depending on the event is hot-add/hot-remove. There are currently |
@@ -99,22 +99,22 @@ at which time hotplug is disabled. | |||
99 | 99 | ||
100 | You really dont need to manipulate any of the system cpu maps. They should | 100 | You really dont need to manipulate any of the system cpu maps. They should |
101 | be read-only for most use. When setting up per-cpu resources almost always use | 101 | be read-only for most use. When setting up per-cpu resources almost always use |
102 | cpu_possible_map/for_each_possible_cpu() to iterate. | 102 | cpu_possible_mask/for_each_possible_cpu() to iterate. |
103 | 103 | ||
104 | Never use anything other than cpumask_t to represent bitmap of CPUs. | 104 | Never use anything other than cpumask_t to represent bitmap of CPUs. |
105 | 105 | ||
106 | #include <linux/cpumask.h> | 106 | #include <linux/cpumask.h> |
107 | 107 | ||
108 | for_each_possible_cpu - Iterate over cpu_possible_map | 108 | for_each_possible_cpu - Iterate over cpu_possible_mask |
109 | for_each_online_cpu - Iterate over cpu_online_map | 109 | for_each_online_cpu - Iterate over cpu_online_mask |
110 | for_each_present_cpu - Iterate over cpu_present_map | 110 | for_each_present_cpu - Iterate over cpu_present_mask |
111 | for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask. | 111 | for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask. |
112 | 112 | ||
113 | #include <linux/cpu.h> | 113 | #include <linux/cpu.h> |
114 | get_online_cpus() and put_online_cpus(): | 114 | get_online_cpus() and put_online_cpus(): |
115 | 115 | ||
116 | The above calls are used to inhibit cpu hotplug operations. While the | 116 | The above calls are used to inhibit cpu hotplug operations. While the |
117 | cpu_hotplug.refcount is non zero, the cpu_online_map will not change. | 117 | cpu_hotplug.refcount is non zero, the cpu_online_mask will not change. |
118 | If you merely need to avoid cpus going away, you could also use | 118 | If you merely need to avoid cpus going away, you could also use |
119 | preempt_disable() and preempt_enable() for those sections. | 119 | preempt_disable() and preempt_enable() for those sections. |
120 | Just remember the critical section cannot call any | 120 | Just remember the critical section cannot call any |