[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1294072896.2016.103.camel@laptop>
Date: Mon, 03 Jan 2011 17:41:36 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Yong Zhang <yong.zhang0@...il.com>,
Chris Mason <chris.mason@...cle.com>,
Frank Rowand <frank.rowand@...sony.com>,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Mike Galbraith <efault@....de>, Paul Turner <pjt@...gle.com>,
Jens Axboe <axboe@...nel.dk>,
Steven Rostedt <rostedt@...dmis.org>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH 08/17] sched: Drop the rq argument to
sched_class::select_task_rq()
On Mon, 2011-01-03 at 17:35 +0100, Peter Zijlstra wrote:
> > In fact, I am completely confused. I do not understand why do we
> > check task_running() at all. If we see on_rq == 0 && on_cpu == 1,
> > then this task is going to clear its on_cpu soon, once it finishes
> > context_switch().
>
> > Probably, this check was needed before, try_to_wake_up() could
> > activate the task_running() task without migrating. But, at first
> > glance, this is no longer possible after this series?
>
> It can still do that, I think the problem is us dropping rq->lock in the
> middle of schedule(), when the freshly woken migration thread comes in
> between there and moves the task away, you can get into the situation
> that two cpus reference the same task_struct at the same time, which
> usually leads to 'interesting' situations.
Frr, brainfart, you cannot schedule the migration thread without
completely finishing prev.
/me goes ponder more
--
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