lkml.org 
[lkml]   [2010]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] sched: enforce per-cpu utilization limits on runtime balancing
From
Date
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) ?



\
 
 \ /
  Last update: 2010-02-25 22:47    [W:0.081 / U:1.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site