Re: [RFC PATCH 5/6] sched/fair: trigger the update of blocked load on newly idle cpu
From: Valentin Schneider
Date: Tue Feb 09 2021 - 12:27:24 EST
On 09/02/21 14:57, Vincent Guittot wrote:
> On Tue, 9 Feb 2021 at 14:09, Valentin Schneider
> <valentin.schneider@xxxxxxx> wrote:
>> On 05/02/21 12:48, Vincent Guittot wrote:
>> > @@ -261,6 +261,12 @@ static void cpuidle_idle_call(void)
>> > static void do_idle(void)
>> > {
>> > int cpu = smp_processor_id();
>> > +
>> > + /*
>> > + * Check if we need to update some blocked load
>> > + */
>> > + nohz_run_idle_balance(cpu);
>> > +
>>
>> What do we gain from doing this here vs having a stats update in
>> newidle_balance()?
>
> As mentioned by Joel, newidle_balance is called in the schedule
> context with preempt and irq off which prevent any local activity
> like irq/timer. Whereas in this new place, we have the same condition
> as during ILB with only preemptoff and _nohz_idle_balance() regularly
> checks if it has to abort because something has been scheduled on the
> cpu.
>
Gotcha, that's already hinted at in the cover letter. Could you point this
out in the changelog? Other than that, I don't see anything wrong with this
approach.