* Re: [RFC] X86 SMP cpu enumeration changes
@ 2007-06-06 22:18 Mark Rustad
2007-06-09 3:08 ` [PATCH] [RFC] wrong cpus started Mark Rustad
0 siblings, 1 reply; 2+ messages in thread
From: Mark Rustad @ 2007-06-06 22:18 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Mark Rustad
As a followup to the message I posted earlier, I found that the
following patch restores the old behavior of allowing maxcpus to
effectively turn off hyperthreading. In case you missed my earlier
message, in 2.6.16 through at least 2.6.19 using the maxcpus trick
will fail to use all of your physical cpus.
Although this patch works for me, I am quite sure that this patch is
unacceptable to folks using CPU hotplug, however. One alternative
would be to make the two lines of code in each location conditional
on CONFIG_HOTPLUG_CPU and !CONFIG_HOTPLUG_CPU respectively, but that
seems a little ugly.
Does anyone have a better fix?
I know my mailer smashes the patch, but this is intended for
discussion rather than application.
--- a/arch/i386/kernel/mpparse.c 2006-11-29 15:57:37.000000000
-0600
+++ b/arch/i386/kernel/mpparse.c 2007-06-06 16:41:06.635814335 -0500
@@ -180,9 +180,6 @@ static void __devinit MP_processor_info
}
apic_version[m->mpc_apicid] = ver;
- phys_cpu = apicid_to_cpu_present(apicid);
- physids_or(phys_cpu_present_map, phys_cpu_present_map,
phys_cpu);
-
if (num_processors >= NR_CPUS) {
printk(KERN_WARNING "WARNING: NR_CPUS limit of %i
reached."
" Processor ignored.\n", NR_CPUS);
@@ -195,6 +192,9 @@ static void __devinit MP_processor_info
return;
}
+ phys_cpu = apicid_to_cpu_present(apicid);
+ physids_or(phys_cpu_present_map, phys_cpu_present_map,
phys_cpu);
+
cpu_set(num_processors, cpu_possible_map);
num_processors++;
--
Mark Rustad, MRustad@gmail.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] [RFC] wrong cpus started
2007-06-06 22:18 [RFC] X86 SMP cpu enumeration changes Mark Rustad
@ 2007-06-09 3:08 ` Mark Rustad
0 siblings, 0 replies; 2+ messages in thread
From: Mark Rustad @ 2007-06-09 3:08 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Mark Rustad
I have noticed that recent kernels, 2.6.16 through at least 2.6.19, hyperthreading
can no longer be effectively disabled by using maxcpus. This means that anyone that
was using maxcpus to disable hyperthreading when running Linux will no longer be
using all of their physical cpus.
The following patch restores the earlier behavior, but I am fairly sure that some
CPU hotplug environments would not want this change. I can imagine making the two
lines moved in the patch below to instead be conditional on CONFIG_HOTPLUG_CPU and
!CONFIG_HOTPLUG_CPU respectively. Can someone more familiar with hotplug CPU come
up with a better fix?
--- a/arch/i386/kernel/mpparse.c 2006-11-29 15:57:37.000000000 -0600
+++ b/arch/i386/kernel/mpparse.c 2007-06-06 16:41:06.635814335 -0500
@@ -180,9 +180,6 @@ static void __devinit MP_processor_info
}
apic_version[m->mpc_apicid] = ver;
- phys_cpu = apicid_to_cpu_present(apicid);
- physids_or(phys_cpu_present_map, phys_cpu_present_map, phys_cpu);
-
if (num_processors >= NR_CPUS) {
printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached."
" Processor ignored.\n", NR_CPUS);
@@ -195,6 +192,9 @@ static void __devinit MP_processor_info
return;
}
+ phys_cpu = apicid_to_cpu_present(apicid);
+ physids_or(phys_cpu_present_map, phys_cpu_present_map, phys_cpu);
+
cpu_set(num_processors, cpu_possible_map);
num_processors++;
--
Mark Rustad, mrustad@gmail.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-09 3:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-06 22:18 [RFC] X86 SMP cpu enumeration changes Mark Rustad
2007-06-09 3:08 ` [PATCH] [RFC] wrong cpus started Mark Rustad
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®