From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@osdl.org>
Cc: mbligh@mbligh.org, linux-kernel@vger.kernel.org, apw@shadowen.org
Subject: Re: [patch] sched: fix macro -> inline function conversion bug
Date: Mon, 3 Jul 2006 08:08:32 +0200 [thread overview]
Message-ID: <20060703060832.GA15940@elte.hu> (raw)
In-Reply-To: <20060703060320.GA15782@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
> > Did you work out which divide is getting the div-by-zero? I started
> > at it a bit and wasn't sure - am getting wildly different code
> > generation over here.
>
> my bet is on sched-group-cpu-power-setup-cleanup.patch.
in particular, we dont seem to initialize ->cpu_power properly. Martin,
does the patch below solve your crash?
Ingo
-------------->
Subject: sched: group cpu power setup cleanup, fix
From: Ingo Molnar <mingo@elte.hu>
- fix missing initialization of ->cpu_power
- clean up the cleanup
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
include/linux/sched.h | 2 +-
kernel/sched.c | 9 +++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
Index: linux/include/linux/sched.h
===================================================================
--- linux.orig/include/linux/sched.h
+++ linux/include/linux/sched.h
@@ -636,7 +636,7 @@ enum idle_type
((sched_mc_power_savings || sched_smt_power_savings) ? \
SD_POWERSAVINGS_BALANCE : 0)
-#define test_sd_flag(sd, flag) ((sd && sd->flags & flag) ? 1 : 0)
+#define test_sd_flag(sd, flag) ((sd && (sd->flags & flag)) ? 1 : 0)
struct sched_group {
Index: linux/kernel/sched.c
===================================================================
--- linux.orig/kernel/sched.c
+++ linux/kernel/sched.c
@@ -1292,7 +1292,7 @@ static int sched_balance_self(int cpu, i
cpu = new_cpu;
nextlevel:
sd = sd->child;
- if (sd && sd->flags & flag)
+ if (test_sd_flag(sd, flag))
goto nextlevel;
/* while loop will break here if sd == NULL */
}
@@ -6224,6 +6224,7 @@ static int cpu_to_allnodes_group(int cpu
{
return cpu_to_node(cpu);
}
+
static void init_numa_sched_groups_power(struct sched_group *group_head)
{
struct sched_group *sg = group_head;
@@ -6314,8 +6315,12 @@ static void init_sched_groups_power(int
struct sched_domain *child;
struct sched_group *group;
- if (!sd || !sd->groups || (cpu != first_cpu(sd->groups->cpumask)))
+ WARN_ON(!sd || !sd->groups);
+
+ if (cpu != first_cpu(sd->groups->cpumask)) {
+ sd->groups->cpu_power = SCHED_LOAD_SCALE;
return;
+ }
child = sd->child;
next prev parent reply other threads:[~2006-07-03 6:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-02 23:27 2.6.17-mm5 Martin J. Bligh
2006-07-02 23:41 ` 2.6.17-mm5 Andrew Morton
2006-07-03 5:25 ` [patch] sched: fix macro -> inline function conversion bug Ingo Molnar
2006-07-03 5:42 ` Andrew Morton
2006-07-03 6:03 ` Ingo Molnar
2006-07-03 6:08 ` Ingo Molnar [this message]
2006-07-05 19:36 ` Siddha, Suresh B
2006-07-05 20:02 ` Ingo Molnar
2006-07-05 21:09 ` Siddha, Suresh B
2006-07-05 21:17 ` Ingo Molnar
2006-07-05 21:21 ` Siddha, Suresh B
2006-07-06 8:27 ` Andy Whitcroft
2006-07-03 6:06 ` Peter Williams
2006-07-03 8:23 ` 2.6.17-mm5 Andy Whitcroft
2006-07-03 14:19 ` 2.6.17-mm5 Andy Whitcroft
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=20060703060832.GA15940@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=apw@shadowen.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@mbligh.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.