Messages in this thread | | | Date | Mon, 28 Jun 2021 17:12:17 +0200 | From | Peter Zijlstra <> | 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.
| |