Re: [PATCH 1/2] cpuset: fix cpuset_cpus_allowed_fallback() don'tupdate tsk->rt.nr_cpus_allowed

From: KOSAKI Motohiro
Date: Sat May 14 2011 - 07:17:42 EST


2011/5/14 Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>:
> On Fri, 2011-05-13 at 14:42 +0800, Yong Zhang wrote:
>> > - rcu_cpu_kthread_should_stop() call set_cpus_allowed_ptr() again
>> > periodically.
>> >  then, it can reset cpumask if cpuset_cpus_allowed_fallback() change it.
>> >  my debug print obseve following cpumask change occur at boot time.
>> >     1) kthread_bind: bind cpu1
>> >     2) cpuset_cpus_allowed_fallback: bind possible cpu
>> >     3) rcu_cpu_kthread_should_stop: rebind cpu1
>> > - while tsk->rt.nr_cpus_allowed == 1, sched load balancer never be crash.
>>
>> Seems rcu_spawn_one_cpu_kthread() call wake_up_process() directly,
>> which is under hotplug event CPU_UP_PREPARE. Maybe it should be
>> under CPU_ONLINE.
>
> IIRC I talked to Paul about this a while back and ONLINE is too late,
> however STARTING should work. At the time he couldn't quite get that to
> work, but the above situation is indeed the root cause of our problems.
>
> We shouldn't try to run a cpu affine thread before the cpu in question
> is actually able to run stuff.
>
> I did me a little hackery and with the below patch my kernel still
> boots...
>
> Would that sort your issue?

Great!!
Unfortunately, I can't test this until next wednesday. but I'll do it
as far as possible soon.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/