Re: [PATCH 2/3] sched: enforce per-cpu utilization limits onruntime balancing

From: Peter Zijlstra
Date: Thu Feb 25 2010 - 16:45:28 EST


On Tue, 2010-02-23 at 19:56 +0100, Fabio Checconi wrote:
> +#ifdef CONFIG_SMP
> +static inline unsigned long rt_init_free_bw(void)
> +{
> + unsigned long used = to_ratio(global_rt_period(), global_rt_runtime());
> +
> + return to_ratio(RUNTIME_INF, RUNTIME_INF) - used;
> +}
> +#endif

> +static void __rt_restart_balancing(void)
> +{
> + unsigned long used, global, free;
> + struct rq *rq;
> + int i;
> +
> + used = rt_used_bandwidth();
> + global = to_ratio(RUNTIME_INF, RUNTIME_INF);
> +
> + free = global - used;


We take the max as RUNTIME_INF instead of global_rt_* so that we can
move runtime around and fully saturate a single cpu (given there is
enough free to compensate on other cpus) ?

--
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/