From: Giuliano Pochini <pochini@shiny.it>
To: Nathan Lynch <ntl@pobox.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: 2 CPUs, but only one is used
Date: Fri, 29 Dec 2006 17:51:59 +0100 [thread overview]
Message-ID: <20061229175159.4c7cb7bb.pochini@shiny.it> (raw)
In-Reply-To: <20061225055251.GR15713@localdomain>
[I resend this msg because I didn't receive it back from the lppc ml]
On Sun, 24 Dec 2006 23:52:51 -0600
Nathan Lynch <ntl@pobox.com> wrote:
> > 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();
Yes, it does. I also tested if tasks are migrated to/off cpu1 when I
enable/disable it and when I boot with or without maxcpus=1. It seems to
work correctly in all cases. Thank you.
--
Giuliano.
prev parent reply other threads:[~2006-12-29 16: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
2006-12-25 10:53 ` Giuliano Pochini
2006-12-29 16:51 ` Giuliano Pochini [this message]
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=20061229175159.4c7cb7bb.pochini@shiny.it \
--to=pochini@shiny.it \
--cc=linuxppc-dev@ozlabs.org \
--cc=ntl@pobox.com \
/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).