[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YNnm0bUfCmB54FYW@hirez.programming.kicks-ass.net>
Date: Mon, 28 Jun 2021 17:12:17 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Huaixin Chang <changhuaixin@...ux.alibaba.com>
Cc: luca.abeni@...tannapisa.it, anderson@...unc.edu, baruah@...tl.edu,
bsegall@...gle.com, dietmar.eggemann@....com,
dtcccc@...ux.alibaba.com, juri.lelli@...hat.com,
khlebnikov@...dex-team.ru, linux-kernel@...r.kernel.org,
mgorman@...e.de, mingo@...hat.com, odin@...d.al, odin@...dal.com,
pauld@...head.com, pjt@...gle.com, rostedt@...dmis.org,
shanpeic@...ux.alibaba.com, tj@...nel.org,
tommaso.cucinotta@...tannapisa.it, vincent.guittot@...aro.org,
xiyou.wangcong@...il.com
Subject: Re: [PATCH v6 2/3] sched/fair: Add cfs bandwidth burst statistics
On Mon, Jun 28, 2021 at 05:00:30PM +0200, Peter Zijlstra wrote:
> I was hoping we could get away with something simpler, like maybe:
>
> u64 old_runtim = cfs_b->runtime;
>
> cfs_b->runtime += cfs_b->quota
> cfs_b->runtime = min(cfs_b->runtime, cfs_b->quota + cfs_b->burst);
>
> if (cfs_b->runtime - old_runtime > cfs_b->quota)
> cfs_b->nr_bursts++;
>
> Would that be good enough?
Bah,, of course not ... :-/ At best we can detect == quota, which might
be a good enough indicator of burst.
Powered by blists - more mailing lists