Re: [PATCH 1/2] cpuset: fix cpuset_cpus_allowed_fallback() don'tupdate tsk->rt.nr_cpus_allowed
From: Yong Zhang
Date: Mon May 16 2011 - 09:26:39 EST
On Sun, May 15, 2011 at 11:55:47AM -0700, Paul E. McKenney wrote:
> > 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.
> Sorry, but this does not work. The kthread must be running by the time
Yup, I also noticed that from the comments of rcu_spawn_one_cpu_kthread();
> the CPU appears, otherwise RCU grace periods in CPU_ONLINE notifiers
> will never complete.
> This did turn out to be a scheduler bug -- see Cheng Xu's recent patch.
Hmmm, I don't think they are same issue.
The patch sent by Cheng Xu is about rt runtime normalization during
But this one is about too earlier rt_rq load balance.
Let consider this:
on boot CPU
__cpu_notify(CPU_UP_PREPARE | mod, hcpu, -1, &nr_calls);
/* here the rcu_thread's cpus_allowed will be set
to cpu_possible_mask, but now we only have the
boot cpu online, so it will run on the boot cpu
So if we have KOSAKI's patch applied,
p->rt.nr_cpus_allowed will be set to
sched_setscheduler_nocheck(t, SCHED_FIFO, &sp);
p->sched_class->switched_to(rq, p); /* rt_class */
/* crash here because local_cpu_mask is uninitialized */
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/