Re: [PATCH v2 2/4] sched/fair: Move active balance logic to its own function

From: Srikar Dronamraju
Date: Tue Oct 01 2019 - 07:38:00 EST


> +unlock:
> + raw_spin_unlock_irqrestore(&busiest->lock, flags);
> +
> + if (status == started)
> + stop_one_cpu_nowait(cpu_of(busiest),
> + active_load_balance_cpu_stop, busiest,
> + &busiest->active_balance_work);
> +
> + /* We've kicked active balancing, force task migration. */
> + if (status != cancelled_affinity)
> + sd->nr_balance_failed = sd->cache_nice_tries + 1;

Should we really update nr_balance_failed if status is cancelled?
I do understand this behaviour was present even before this change. But
still dont understand why we need to update if the current operation didn't
kick active_load_balance.

--
Thanks and Regards
Srikar Dronamraju