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.

Documentation: cpu-hotplug: Fix typos

Fix some minor spelling errors and capitalization issues.

Signed-off-by: Igor Vuk <parcijala@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Igor Vuk and committed by
Jonathan Corbet
bb118c56 7b855a12

+16 -16
+16 -16
Documentation/cpu-hotplug.txt
··· 84 84 upfront can save some boot time memory. See below for how we use heuristics 85 85 in x86_64 case to keep this under check. 86 86 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 89 - interrupts from devices. Its cleared when a cpu is brought down using 87 + cpu_online_mask: Bitmap of all CPUs currently online. It's set in __cpu_up() 88 + after a CPU is available for kernel scheduling and ready to receive 89 + interrupts from devices. It's cleared when a CPU is brought down using 90 90 __cpu_disable(), before which all OS services including interrupts are 91 91 migrated to another target CPU. 92 92 ··· 181 181 the platform should have something like an attention button in PCI hotplug. 182 182 CONFIG_ACPI_HOTPLUG_CPU enables ACPI support for physical add/remove of CPUs. 183 183 184 - Q: How do i logically offline a CPU? 184 + Q: How do I logically offline a CPU? 185 185 A: Do the following. 186 186 187 187 #echo 0 > /sys/devices/system/cpu/cpuX/online ··· 191 191 #cat /proc/interrupts 192 192 193 193 You should now not see the CPU that you removed. Also online file will report 194 - the state as 0 when a cpu if offline and 1 when its online. 194 + the state as 0 when a CPU is offline and 1 when it's online. 195 195 196 196 #To display the current cpu state. 197 197 #cat /sys/devices/system/cpu/cpuX/online 198 198 199 - Q: Why can't i remove CPU0 on some systems? 199 + Q: Why can't I remove CPU0 on some systems? 200 200 A: Some architectures may have some special dependency on a certain CPU. 201 201 202 - For e.g in IA64 platforms we have ability to sent platform interrupts to the 202 + For e.g in IA64 platforms we have ability to send platform interrupts to the 203 203 OS. a.k.a Corrected Platform Error Interrupts (CPEI). In current ACPI 204 204 specifications, we didn't have a way to change the target CPU. Hence if the 205 205 current ACPI version doesn't support such re-direction, we disable that CPU ··· 231 231 232 232 --Fenghua Yu <fenghua.yu@intel.com> 233 233 234 - Q: How do i find out if a particular CPU is not removable? 234 + Q: How do I find out if a particular CPU is not removable? 235 235 A: Depending on the implementation, some architectures may show this by the 236 236 absence of the "online" file. This is done if it can be determined ahead of 237 237 time that this CPU cannot be removed. ··· 250 250 - All processes are migrated away from this outgoing CPU to new CPUs. 251 251 The new CPU is chosen from each process' current cpuset, which may be 252 252 a subset of all online CPUs. 253 - - All interrupts targeted to this CPU is migrated to a new CPU 253 + - All interrupts targeted to this CPU are migrated to a new CPU 254 254 - timers/bottom half/task lets are also migrated to a new CPU 255 255 - Once all services are migrated, kernel calls an arch specific routine 256 256 __cpu_disable() to perform arch specific cleanup. ··· 259 259 CPU is being offlined). 260 260 261 261 "It is expected that each service cleans up when the CPU_DOWN_PREPARE 262 - notifier is called, when CPU_DEAD is called its expected there is nothing 262 + notifier is called, when CPU_DEAD is called it's expected there is nothing 263 263 running on behalf of this CPU that was offlined" 264 264 265 - Q: If i have some kernel code that needs to be aware of CPU arrival and 265 + Q: If I have some kernel code that needs to be aware of CPU arrival and 266 266 departure, how to i arrange for proper notification? 267 267 A: This is what you would need in your kernel code to receive notifications. 268 268 ··· 311 311 312 312 Q: I don't see my action being called for all CPUs already up and running? 313 313 A: Yes, CPU notifiers are called only when new CPUs are on-lined or offlined. 314 - If you need to perform some action for each cpu already in the system, then 314 + If you need to perform some action for each CPU already in the system, then 315 315 do this: 316 316 317 317 for_each_online_cpu(i) { ··· 363 363 callbacks as well as initialize the already online CPUs. 364 364 365 365 366 - Q: If i would like to develop cpu hotplug support for a new architecture, 367 - what do i need at a minimum? 366 + Q: If I would like to develop CPU hotplug support for a new architecture, 367 + what do I need at a minimum? 368 368 A: The following are what is required for CPU hotplug infrastructure to work 369 369 correctly. 370 370 ··· 382 382 per_cpu state to be set, to ensure the processor 383 383 dead routine is called to be sure positively. 384 384 385 - Q: I need to ensure that a particular cpu is not removed when there is some 386 - work specific to this cpu is in progress. 385 + Q: I need to ensure that a particular CPU is not removed when there is some 386 + work specific to this CPU in progress. 387 387 A: There are two ways. If your code can be run in interrupt context, use 388 388 smp_call_function_single(), otherwise use work_on_cpu(). Note that 389 389 work_on_cpu() is slow, and can fail due to out of memory: