lkml.org 
[lkml]   [2021]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] sched/core: forced idle accounting
On Tue, Nov 9, 2021 at 2:21 AM Peter Zijlstra <peterz@infradead.org> wrote:
>
> 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...

The others are not needed for correctness, but I do agree it makes
sense to keep the state consistent. I think that set is

core_pick
core_cookie
core_forceidle_count
core_forceidle_occupation

I can throw another patch on top of this to reset those as well.

\
 
 \ /
  Last update: 2021-11-10 00:00    [W:0.091 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site