[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110103145902.GA7632@redhat.com>
Date: Mon, 3 Jan 2011 15:59:02 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
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 01/03, Peter Zijlstra wrote:
>
> On Wed, 2010-12-29 at 22:31 +0800, Yong Zhang wrote:
> > > - /*
> > > - * select_task_rq() can race against ->cpus_allowed
> > > - */
> > > - if (cpumask_test_cpu(dest_cpu, &p->cpus_allowed) &&
> > > - likely(cpu_active(dest_cpu)) && migrate_task(p, rq)) {
> > > + if (likely(cpu_active(dest_cpu)) && need_migrate_task(p)) {
> >
> > If we drop rq_lock, need_migrate_task() maybe return true but
> > p is already running on other cpu. Thus we do a wrong migration
> > call.
>
> Yeah, too bad.. ;-) exec load balancing is more an optimistic thing
> anyway, if it got rebalanced under out feet we don't care.
I don't understand this need_migrate_task() at all (with or without
the patch). This task is current/running, it should always return T.
I guess, migrate_task() was needed before to initialize migration_req.
Oleg.
--
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