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: <20210326140706.GH4746@worktop.programming.kicks-ass.net>
Date:   Fri, 26 Mar 2021 15:07:06 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Dietmar Eggemann <dietmar.eggemann@....com>
Cc:     mingo@...nel.org, mgorman@...e.de, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, rostedt@...dmis.org,
        bsegall@...gle.com, bristot@...hat.com, joshdon@...gle.com,
        valentin.schneider@....com, linux-kernel@...r.kernel.org,
        greg@...ah.com
Subject: Re: [PATCH 9/9] sched,fair: Alternative sched_slice()

On Fri, Mar 26, 2021 at 01:08:44PM +0100, Dietmar Eggemann wrote:
> On 26/03/2021 11:34, Peter Zijlstra wrote:
> > The current sched_slice() seems to have issues; there's two possible
> > things that could be improved:
> > 
> >  - the 'nr_running' used for __sched_period() is daft when cgroups are
> >    considered. Using the RQ wide h_nr_running seems like a much more
> >    consistent number.
> > 
> >  - (esp) cgroups can slice it real fine, which makes for easy
> >    over-scheduling, ensure min_gran is what the name says.
> 
> So ALT_PERIOD considers all runnable CFS tasks now and BASE_SLICE
> guarantees min_gran as a floor for cgroup (hierarchies) with small
> weight value(s)?

Pretty much.

The previous cfs_rq->nr_running is just how many runnable thingies there
are in whatever cgroup you happen to be in on our CPU, not counting its
child cgroups nor whatever is upwards. Which is a pretty arbitrary
value.

By always using h_nr_running of the root, we get a consistent number and
the period is the same for all tasks on the CPU.

And yes, low weight cgroups, or even just a nice -20 and 19 task
together would result in *tiny* slices, which then leads to
over-scheduling. So by only scaling the part between period and
min_gran, we still get a variable slice, but also avoid the worst cases.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ