Re: [PATCH v2] sched/core: forced idle accounting

From: Peter Zijlstra
Date: Tue Nov 09 2021 - 05:22:15 EST


On Mon, Oct 18, 2021 at 01:34:28PM -0700, Josh Don wrote:
> @@ -280,6 +288,8 @@ static void __sched_core_flip(bool enabled)
> for_each_cpu(t, smt_mask)
> cpu_rq(t)->core_enabled = enabled;
>
> + cpu_rq(cpu)->core->core_forceidle_start = 0;
> +
> sched_core_unlock(cpu, &flags);
>
> cpumask_andnot(&sched_core_mask, &sched_core_mask, smt_mask);

Not specific to this patch, but perhaps we should do better here and
explicitly initialize more state...