[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1258107368.4039.1149.camel@laptop>
Date: Fri, 13 Nov 2009 11:16:08 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: ego@...ibm.com
Cc: Sachin Sant <sachinp@...ibm.com>,
LKML <linux-kernel@...r.kernel.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
linux-next@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
Mike Galbraith <efault@....de>
Subject: Re: -next: Nov 12 - kernel BUG at kernel/sched.c:7359!
On Fri, 2009-11-13 at 15:28 +0530, Gautham R Shenoy wrote:
> On Thu, Nov 12, 2009 at 06:10:31PM +0100, Peter Zijlstra wrote:
> >
> > diff --git a/kernel/sched.c b/kernel/sched.c
> > index 1f2e99d..62df61c 100644
> > --- a/kernel/sched.c
> > +++ b/kernel/sched.c
> > @@ -2377,6 +2377,9 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
> > task_rq_unlock(rq, &flags);
> >
>
> How about this ?
>
> again:
> cpu = p->sched_class->select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
> if (!cpu_online(cpu))
> cpu = cpumask_any_and(&p->cpus_allowed, cpu_active_mask);
> if (!cpu) {
> set_task_affinity();
> goto again;
> }
> > +
> > if (cpu != orig_cpu) {
> > local_irq_save(flags);
> > rq = cpu_rq(cpu);
Index: linux-2.6/kernel/sched.c
===================================================================
--- linux-2.6.orig/kernel/sched.c
+++ linux-2.6/kernel/sched.c
@@ -2376,7 +2376,15 @@ static int try_to_wake_up(struct task_st
p->state = TASK_WAKING;
__task_rq_unlock(rq);
+again:
cpu = p->sched_class->select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
+ if (!cpu_online(cpu))
+ cpu = cpumask_any_and(&p->cpus_allowed, cpu_online_mask);
+ if (cpu >= nr_cpu_ids) {
+ cpuset_cpus_allowed_locked(p, &p->cpus_allowed);
+ goto again;
+ }
+
if (cpu != orig_cpu) {
rq = cpu_rq(cpu);
update_rq_clock(rq);
is what I stuck in and am compiling now.. we'll see what that does.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists