lkml.org 
[lkml]   [2013]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 1/2] sched: fix init NOHZ_IDLE flag
From
2013/2/18 Vincent Guittot <vincent.guittot@linaro.org>:
> On 18 February 2013 15:38, Frederic Weisbecker <fweisbec@gmail.com> wrote:
>> I pasted the original at: http://pastebin.com/DMm5U8J8
>
> We can clear the idle flag only in the nohz_kick_needed which will not
> be called if the sched_domain is NULL so the sequence will be
>
> = CPU 0 = = CPU 1=
>
> detach_and_destroy_domain {
> rcu_assign_pointer(cpu1_dom, NULL);
> }
>
> dom = new_domain(...) {
> nr_cpus_busy = 0;
> set_idle(CPU 1);
> }
> dom =
> rcu_dereference(cpu1_dom)
> //dom == NULL, return
>
> rcu_assign_pointer(cpu1_dom, dom);
>
> dom =
> rcu_dereference(cpu1_dom)
> //dom != NULL,
> nohz_kick_needed {
>
> set_idle(CPU 1)
> dom
> = rcu_dereference(cpu1_dom)
>
> //dec nr_cpus_busy,
> }
>
> Vincent

Ok but CPU 0 can assign NULL to the domain of cpu1 while CPU 1 is
already in the middle of nohz_kick_needed().


\
 
 \ /
  Last update: 2013-02-18 17:21    [W:0.059 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site