[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070807183609.GA81@tv-sign.ru>
Date: Tue, 7 Aug 2007 22:36:09 +0400
From: Oleg Nesterov <oleg@...sign.ru>
To: Venki Pallipadi <venkatesh.pallipadi@...el.com>
Cc: Gautham R Shenoy <ego@...ibm.com>, Ingo Molnar <mingo@...e.hu>,
Srivatsa Vaddagiri <vatsa@...ibm.com>,
linux-kernel@...r.kernel.org, Dipankar Sarma <dipankar@...ibm.com>,
Paul E McKenney <paulmck@...ibm.com>
Subject: Re: Cpu-Hotplug and Real-Time
On 08/07, Venki Pallipadi wrote:
>
> On Tue, Aug 07, 2007 at 07:13:36PM +0400, Oleg Nesterov wrote:
> >
> > As for kthread_bind(), I think wait_task_inactive+set_task_cpu is just
> > an optimization, and easy to "fix":
> >
> > --- kernel/kthread.c 2007-07-28 16:58:17.000000000 +0400
> > +++ /proc/self/fd/0 2007-08-07 18:56:54.248073547 +0400
> > @@ -166,10 +166,7 @@ void kthread_bind(struct task_struct *k,
> > WARN_ON(1);
> > return;
> > }
> > - /* Must have done schedule() in kthread() before we set_task_cpu */
> > - wait_task_inactive(k);
> > - set_task_cpu(k, cpu);
> > - k->cpus_allowed = cpumask_of_cpu(cpu);
> > + set_cpus_allowed(current, cpumask_of_cpu(cpu));
> > }
> > EXPORT_SYMBOL(kthread_bind);
> >
>
> Not sure whether set_cpus_allowed() will work here. Looks like, it needs the
> CPU to be online during the call and in kthread_bind() case CPU may be offline.
Aah, you are right, of course.
Thanks,
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