All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] (Was: sched: start stopper early)
@ 2015-10-10 18:52 Oleg Nesterov
  2015-10-10 18:53 ` [PATCH 1/3] sched: select_task_rq() should check cpu_active() like select_fallback_rq() Oleg Nesterov
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Oleg Nesterov @ 2015-10-10 18:52 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: heiko.carstens, Tejun Heo, Ingo Molnar, Rik van Riel,
	Thomas Gleixner, Vitaly Kuznetsov, linux-kernel

To avoid the confusion, this has nothing to do with "stop_machine"
changes we discuss in another thread, but

On 10/09, Oleg Nesterov wrote:
>
> >  	case CPU_ONLINE:
> > +		stop_machine_unpark(cpu);
> >  		/*
> >  		 * At this point a starting CPU has marked itself as online via
> >  		 * set_cpu_online(). But it might not yet have marked itself
> > @@ -5337,7 +5340,7 @@ static int sched_cpu_active(struct notifier_block *nfb,
> >  		 * Thus, fall-through and help the starting CPU along.
> >  		 */
> >  	case CPU_DOWN_FAILED:
> > -		set_cpu_active((long)hcpu, true);
> > +		set_cpu_active(cpu, true);
>
> On a second thought, we can't do this (and your initial change has
> the same problem).
>
> We can not wakeup it before set_cpu_active(). This can lead to the
> same problem fixed by dd9d3843755da95f6 "sched: Fix cpu_active_mask/
> cpu_online_mask race".

OTOH, I don't understand why do we actually need this fix... Or, iow
I don't really understand the cpu_active() checks in select_fallback_rq().

Looks like we have some strange arch/ which has the "unsafe" online &&
!active window, but then it is not clear why it is safe to mark it active
in sched_cpu_active(CPU_ONLINE). Confused.

And I am even more confused by the fact that select_fallback_rq()
checks cpu_active(), but select_task_rq() doesn't. This can't be right
in any case.

Oleg.


 kernel/sched/core.c |   41 +++++++++++++++++++++--------------------
 1 files changed, 21 insertions(+), 20 deletions(-)


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-10-20  9:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-10 18:52 [PATCH 0/3] (Was: sched: start stopper early) Oleg Nesterov
2015-10-10 18:53 ` [PATCH 1/3] sched: select_task_rq() should check cpu_active() like select_fallback_rq() Oleg Nesterov
2015-10-11 18:04   ` Oleg Nesterov
2015-10-11 18:57     ` Thomas Gleixner
2015-10-12 12:16   ` Peter Zijlstra
2015-10-12 17:34     ` Oleg Nesterov
2015-10-14 15:00       ` Peter Zijlstra
2015-10-14 20:05         ` Oleg Nesterov
2015-10-14 20:35           ` Peter Zijlstra
2015-10-10 18:53 ` [PATCH 2/3] sched: change select_fallback_rq() to use for_each_cpu_and() Oleg Nesterov
2015-10-10 18:53 ` [PATCH 3/3] sched: don't scan all-offline ->cpus_allowed twice if !CONFIG_CPUSETS Oleg Nesterov
2015-10-20  9:35   ` [tip:sched/core] sched: Don't scan all-offline -> cpus_allowed " tip-bot for Oleg Nesterov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.