From: Mark Rustad <mrustad@gmail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Mark Rustad <MRustad@mac.com>
Subject: Re: [RFC] X86 SMP cpu enumeration changes
Date: Wed, 6 Jun 2007 17:18:52 -0500 [thread overview]
Message-ID: <30838F2E-65FC-4566-9DFE-359401BB3F54@gmail.com> (raw)
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
next reply other threads:[~2007-06-06 22:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-06 22:18 Mark Rustad [this message]
2007-06-09 3:08 ` [PATCH] [RFC] wrong cpus started Mark Rustad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30838F2E-65FC-4566-9DFE-359401BB3F54@gmail.com \
--to=mrustad@gmail.com \
--cc=MRustad@mac.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®