Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133341262
D20019.id56519.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
854 B
Referenced Files
None
Subscribers
None
D20019.id56519.diff
View Options
Index: sys/x86/x86/mp_x86.c
===================================================================
--- sys/x86/x86/mp_x86.c
+++ sys/x86/x86/mp_x86.c
@@ -1397,8 +1397,10 @@
cpustop_handler(void)
{
u_int cpu;
+ int apic;
cpu = PCPU_GET(cpuid);
+ apic = PCPU_GET(apic_id);
savectx(&stoppcbs[cpu]);
@@ -1406,8 +1408,18 @@
CPU_SET_ATOMIC(cpu, &stopped_cpus);
/* Wait for restart */
- while (!CPU_ISSET(cpu, &started_cpus))
- ia32_pause();
+ while (!CPU_ISSET(cpu, &started_cpus)) {
+ ia32_pause();
+
+ /*
+ * Halt non-BSP CPUs on panic -- we're never going to need them
+ * again, and might as well save power / release resources
+ * (e.g., overprovisioned VM infrastructure).
+ */
+ while (__predict_false(boot_cpu_id != -1 && apic != boot_cpu_id
+ && panicstr != NULL))
+ halt();
+ }
cpustop_handler_post(cpu);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 26, 1:28 AM (4 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24204113
Default Alt Text
D20019.id56519.diff (854 B)
Attached To
Mode
D20019: x86: Halt non-BSP CPUs on panic IPI_STOP
Attached
Detach File
Event Timeline
Log In to Comment