lkml.org 
[lkml]   [2016]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v3 1/6] Track the active utilisation
On Fri, 18 Nov 2016 15:23:59 +0100
Peter Zijlstra <peterz@infradead.org> wrote:


> That said; there's something to be said for:
>
> u64 running_bw;
>
> static void add_running_bw(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq)
> {
> u64 old = dl_rq->running_bw;
>
> dl_rq->running_bw += dl_se->dl_bw;
> SCHED_WARN_ON(dl_rq->running_bw < old); /* overflow */
> }
>
> static void sub_running_bw(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq)
> {
> u64 old = dl_rq->running_bw;
>
> dl_rq->running_bw -= dl_se->dl_bw;
> SCHED_WARN_ON(dl_rq->running_bw > old); /* underflow */
> }
>

Acked-by: me

-- Steve

\
 
 \ /
  Last update: 2016-11-18 17:43    [W:0.249 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site