From: Nathan Lynch <ntl@pobox.com>
To: Giuliano Pochini <pochini@shiny.it>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: 2 CPUs, but only one is used
Date: Sun, 24 Dec 2006 23:52:51 -0600 [thread overview]
Message-ID: <20061225055251.GR15713@localdomain> (raw)
In-Reply-To: <20061224175852.1b52740a.pochini@shiny.it>
Giuliano Pochini wrote:
> I have a dual G4 MDD mac running linux 2.6.19. When I boot with maxcpus=1 and
> then I issue "echo 1 >/sys/devices/system/cpu/cpu1/online" the second CPU is
> put online without errors, but it stays idle+wait=100% and of course
> user+system+nice=0%. It works fine without maxcpus=1. No problems with 2.6.18.
...
> At the end of kernel/cpu.c::cpu_up() both cpus are set as present, possible
> and online. The problem is that in kernel/sched.c::find_idlest_group()
> p->cpus_allowed is always 1 (it should be 3). I tried to put a dump_stack()
> or a printk(mask) in set_cpu_mask() but it crashes badly when mask is not 3,
> ie. anything different from khelper or kthread, so I couldn't know what sets
> the wrong cpumask.
Does this fix it?
diff --git a/kernel/sched.c b/kernel/sched.c
index b515e3c..3c8b1c5 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6875,7 +6875,7 @@ void __init sched_init_smp(void)
lock_cpu_hotplug();
arch_init_sched_domains(&cpu_online_map);
- cpus_andnot(non_isolated_cpus, cpu_online_map, cpu_isolated_map);
+ cpus_andnot(non_isolated_cpus, cpu_possible_map, cpu_isolated_map);
if (cpus_empty(non_isolated_cpus))
cpu_set(smp_processor_id(), non_isolated_cpus);
unlock_cpu_hotplug();
next prev parent reply other threads:[~2006-12-25 5:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-17 13:41 2 CPUs, but only one is used Giuliano Pochini
2006-12-19 23:35 ` Giuliano Pochini
2006-12-20 4:14 ` Haren Myneni
2006-12-20 14:16 ` Nathan Lynch
2006-12-21 22:33 ` Giuliano Pochini
2006-12-24 16:58 ` Giuliano Pochini
2006-12-25 5:52 ` Nathan Lynch [this message]
2006-12-25 10:53 ` Giuliano Pochini
2006-12-29 16:51 ` Giuliano Pochini
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=20061225055251.GR15713@localdomain \
--to=ntl@pobox.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=pochini@shiny.it \
/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;
as well as URLs for NNTP newsgroup(s).