Re: [patch 06/15] sched: accumulate per-cfs_rq cpu usage andcharge against bandwidth

From: Peter Zijlstra
Date: Mon May 16 2011 - 06:33:29 EST


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/