lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABk29NsaiO=4fG=0qGpQoSVgBMfw_rSo2DsC5mfgJvAvQcNQzQ@mail.gmail.com>
Date:   Tue, 9 Nov 2021 14:59:33 -0800
From:   Josh Don <joshdon@...gle.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Ingo Molnar <mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Joel Fernandes <joel@...lfernandes.org>,
        Vineeth Pillai <vineethrp@...il.com>,
        Hao Luo <haoluo@...gle.com>, Tao Zhou <tao.zhou@...ux.dev>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] sched/core: forced idle accounting

On Tue, Nov 9, 2021 at 2:21 AM Peter Zijlstra <peterz@...radead.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ