public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <piggin@cyberone.com.au>
To: Ingo Molnar <mingo@elte.hu>
Cc: Dimitri Sivanich <sivanich@sgi.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>, Jesse Barnes <jbarnes@sgi.com>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH] isolcpus option broken in 2.6.10-rc2-bk2
Date: Wed, 08 Dec 2004 19:57:36 +1100	[thread overview]
Message-ID: <41B6C200.50807@cyberone.com.au> (raw)
In-Reply-To: <20041206211817.GB10235@elte.hu>

[-- Attachment #1: Type: text/plain, Size: 1399 bytes --]



Ingo Molnar wrote:

>* Dimitri Sivanich <sivanich@sgi.com> wrote:
>
>
>>The isolcpus option is broken in 2.6.10-rc2-bk2.  The domains are no longer
>>being properly initialized (which results in a panic at bootup).
>>
>>The following patch fixes this.
>>
>>Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
>>
>
>Acked-by: Ingo Molnar <mingo@elte.hu>
>
>only a minor nit:
>
>
>>+	/* Initialize isolated CPU (physical) domains and groups */
>>+	for_each_cpu_mask(i, cpu_isolated_map) {
>>+		struct sched_domain *sd = NULL;
>>
>
>there's no need to initialize 'sd' to NULL here.
>
>
>>+		int group;
>>+
>>+		sd = &per_cpu(phys_domains, i);
>>+		group = cpu_to_phys_group(i);
>>
>
>>+	for_each_cpu_mask(i, cpu_isolated_map) {
>>+		struct sched_domain *sd = NULL;
>>
>
>ditto.
>
>
>>+		int group;
>>+
>>+		sd = &per_cpu(phys_domains, i);
>>+		group = cpu_to_phys_group(i);
>>+		*sd = SD_CPU_INIT;
>>
>
>	Ingo
>
>
>

Actually, this is wrong. And I was wrong to say that the fix was
to initialize the dummy domain (because its ->flags are 0, there
is no need for it to have anything else set up).

The isolated domains don't need to be set up because they correctly
point to the dummy domain, which is already set up properly (zeroed).
The oops is just a problem with sched_domain_debug.

Andrew and/or Linus, please make sure Dimitri's patch gets reverted
and the attached one applied before 2.6.10.


[-- Attachment #2: sched-debug-oops.patch --]
[-- Type: text/plain, Size: 1431 bytes --]



Fix an oops in sched_domain_debug when using the isolcpus= option.

Also move a debug check for validating groups into the "for-each-group"
loop, where it should be.

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>


---

 linux-2.6-npiggin/kernel/sched.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -puN kernel/sched.c~sched-debug-oops kernel/sched.c
--- linux-2.6/kernel/sched.c~sched-debug-oops	2004-12-08 19:51:48.000000000 +1100
+++ linux-2.6-npiggin/kernel/sched.c	2004-12-08 19:53:23.000000000 +1100
@@ -4446,6 +4446,7 @@ static void sched_domain_debug(void)
 				if (sd->parent)
 					printk(" ERROR !SD_LOAD_BALANCE domain has parent");
 				printk("\n");
+				break;
 			}
 
 			printk("span %s\n", str);
@@ -4454,8 +4455,6 @@ static void sched_domain_debug(void)
 				printk(KERN_DEBUG "ERROR domain->span does not contain CPU%d\n", i);
 			if (!cpu_isset(i, group->cpumask))
 				printk(KERN_DEBUG "ERROR domain->groups does not contain CPU%d\n", i);
-			if (!group->cpu_power)
-				printk(KERN_DEBUG "ERROR domain->cpu_power not set\n");
 
 			printk(KERN_DEBUG);
 			for (j = 0; j < level + 2; j++)
@@ -4466,6 +4465,9 @@ static void sched_domain_debug(void)
 					printk(" ERROR: NULL");
 					break;
 				}
+				
+				if (!group->cpu_power)
+					printk(KERN_DEBUG "ERROR group->cpu_power not set\n");
 
 				if (!cpus_weight(group->cpumask))
 					printk(" ERROR empty group:");

_

  reply	other threads:[~2004-12-08  8:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-06 18:52 [PATCH] isolcpus option broken in 2.6.10-rc2-bk2 Dimitri Sivanich
2004-12-06 21:18 ` Ingo Molnar
2004-12-08  8:57   ` Nick Piggin [this message]
2004-12-08  9:04     ` Ingo Molnar
2004-12-07 22:59 ` Nick Piggin

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=41B6C200.50807@cyberone.com.au \
    --to=piggin@cyberone.com.au \
    --cc=akpm@osdl.org \
    --cc=jbarnes@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sivanich@sgi.com \
    --cc=torvalds@osdl.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