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: <20230801153731.GD11704@hirez.programming.kicks-ass.net>
Date:   Tue, 1 Aug 2023 17:37:31 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Phil Auld <pauld@...hat.com>
Cc:     linux-kernel@...r.kernel.org, Juri Lelli <juri.lelli@...hat.com>,
        Ingo Molnar <mingo@...hat.com>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Valentin Schneider <vschneid@...hat.com>,
        Ben Segall <bsegall@...gle.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Mel Gorman <mgorman@...e.de>,
        Frederic Weisbecker <frederic@...nel.org>,
        Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH v6 2/2] Sched/fair: Block nohz tick_stop when cfs
 bandwidth in use

On Tue, Aug 01, 2023 at 07:13:42AM -0400, Phil Auld wrote:
> On Tue, Aug 01, 2023 at 12:49:34AM +0200 Peter Zijlstra wrote:
> > On Wed, Jul 12, 2023 at 09:33:57AM -0400, Phil Auld wrote:
> > > CFS bandwidth limits and NOHZ full don't play well together.  Tasks
> > > can easily run well past their quotas before a remote tick does
> > > accounting.  This leads to long, multi-period stalls before such
> > > tasks can run again. Currently, when presented with these conflicting
> > > requirements the scheduler is favoring nohz_full and letting the tick
> > > be stopped. However, nohz tick stopping is already best-effort, there
> > > are a number of conditions that can prevent it, whereas cfs runtime
> > > bandwidth is expected to be enforced.
> > > 
> > > Make the scheduler favor bandwidth over stopping the tick by setting
> > > TICK_DEP_BIT_SCHED when the only running task is a cfs task with
> > > runtime limit enabled. We use cfs_b->hierarchical_quota to
> > > determine if the task requires the tick.
> > > 
> > > Add check in pick_next_task_fair() as well since that is where
> > > we have a handle on the task that is actually going to be running.
> > > 
> > > Add check in sched_can_stop_tick() to cover some edge cases such
> > > as nr_running going from 2->1 and the 1 remains the running task.
> > 
> > These appear fine to me, except:
> >
> > > Add sched_feat HZ_BW (off by default) to control the tick_stop
> > > behavior.
> > 
> > What was the thinking here? This means nobody will be using this -- why
> > would you want this default disabled?
> > 
> 
> That was just a hedge in case it caused issues. I'd probably have had to
> enable it in RHEL anyway. Using a feature was to make it inocuous when
> disabled.  Would you prefer me to enable it or remove the sched_feat
> entirely? (or do you want to just switch that to true when you apply it?)

I've edited it to default enabled -- we can pull the feature flag
eventually I suppose.

Things didn't readily apply, so I've kicked at it a little. Should be in
queue/sched/core for the robots to chew on.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ