On Sat, 2014-07-12 at 13:25 +0400, Kirill Tkhai wrote:

> >  
> > +unsigned long nr_running_cpu(int cpu)
> > +{
> > +   if (cpumask_test_cpu(cpu, cpu_online_mask))
> > +           return cpu_rq(cpu)->nr_running;
> > +   else
> > +           return 0;
> > +}
> > +
> 
> Offline cpu should have nr_running equal to 0. We park last
> enqueued thread (migration_thread) at the end of take_cpu_down().
> 
> So, it's enough to return cpu_rq(cpu)->nr_running.

Thanks.  This seems reasonable.

Tim

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to