lkml.org 
[lkml]   [2011]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 06/15] sched: accumulate per-cfs_rq cpu usage and charge against bandwidth
From
Date
On Tue, 2011-05-03 at 02:28 -0700, Paul Turner wrote:
> static int do_sched_cfs_period_timer(struct cfs_bandwidth *cfs_b, int
> overrun)
> {
> - return 1;
> + u64 quota, runtime = 0;
> + int idle = 0;
> +
> + raw_spin_lock(&cfs_b->lock);
> + quota = cfs_b->quota;
> +
> + if (quota != RUNTIME_INF) {
> + runtime = quota;
> + cfs_b->runtime = runtime;
> +
> + idle = cfs_b->idle;
> + cfs_b->idle = 1;
> + }
> + raw_spin_unlock(&cfs_b->lock);
> +
> + return idle;
> }

Shouldn't that also return 'idle' when quota is INF? No point in keeping
that timer ticking when there's no actual accounting anymore.


\
 
 \ /
  Last update: 2011-05-16 12:35    [W:0.368 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site