lkml.org 
[lkml]   [2013]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] sched: compute runnable load avg in cpu_load and cpu_avg_load_per_task

* Alex Shi <alex.shi@intel.com> wrote:

> @@ -2539,7 +2539,11 @@ static void __update_cpu_load(struct rq *this_rq, unsigned long this_load,
> void update_idle_cpu_load(struct rq *this_rq)
> {
> unsigned long curr_jiffies = ACCESS_ONCE(jiffies);
> +#if defined(CONFIG_SMP) && defined(CONFIG_FAIR_GROUP_SCHED)
> + unsigned long load = (unsigned long)this_rq->cfs.runnable_load_avg;
> +#else
> unsigned long load = this_rq->load.weight;
> +#endif

I'd not make it conditional - just calculate runnable_load_avg
all the time (even if group scheduling is disabled) and use it
consistently. The last thing we want is to bifurcate scheduler
balancer behavior even further.

Thanks,

Ingo


\
 
 \ /
  Last update: 2013-01-24 11:43    [W:0.096 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site