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: <20190828114134.GH2369@hirez.programming.kicks-ass.net>
Date:   Wed, 28 Aug 2019 13:41:34 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Valentin Schneider <valentin.schneider@....com>
Cc:     Liangyan <liangyan.peng@...ux.alibaba.com>,
        Ingo Molnar <mingo@...hat.com>,
        Ben Segall <bsegall@...gle.com>, linux-kernel@...r.kernel.org,
        shanpeic@...ux.alibaba.com, xlpang@...ux.alibaba.com
Subject: Re: [PATCH v3] sched/fair: don't assign runtime for throttled cfs_rq

On Wed, Aug 28, 2019 at 11:16:52AM +0100, Valentin Schneider wrote:
> On 26/08/2019 13:16, Liangyan wrote:
> > do_sched_cfs_period_timer() will refill cfs_b runtime and call
> > distribute_cfs_runtime to unthrottle cfs_rq, sometimes cfs_b->runtime
> > will allocate all quota to one cfs_rq incorrectly, then other cfs_rqs
> > attached to this cfs_b can't get runtime and will be throttled.
> > 
> > We find that one throttled cfs_rq has non-negative
> > cfs_rq->runtime_remaining and cause an unexpetced cast from s64 to u64
> > in snippet: distribute_cfs_runtime() {
> > runtime = -cfs_rq->runtime_remaining + 1; }.
> > The runtime here will change to a large number and consume all
> > cfs_b->runtime in this cfs_b period.
> > 
> > According to Ben Segall, the throttled cfs_rq can have
> > account_cfs_rq_runtime called on it because it is throttled before
> > idle_balance, and the idle_balance calls update_rq_clock to add time
> > that is accounted to the task.
> > 
> > This commit prevents cfs_rq to be assgined new runtime if it has been
> > throttled until that distribute_cfs_runtime is called.
> > 
> > Signed-off-by: Liangyan <liangyan.peng@...ux.alibaba.com>
> > Reviewed-by: Ben Segall <bsegall@...gle.com>
> > Reviewed-by: Valentin Schneider <valentin.schneider@....com>
> 
> @Peter/Ingo, if we care about it I believe it can't hurt to strap
> 
> Cc: <stable@...r.kernel.org>
> Fixes: d3d9dc330236 ("sched: Throttle entities exceeding their allowed bandwidth")
> 
> to the thing.

OK, done.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ