Re: [PATCH 2/2 v4] sched: Rewrite per entity runnable load average

From: Yuyang Du
Date: Thu Jul 31 2014 - 23:18:53 EST

Hi Vincent,

On Thu, Jul 31, 2014 at 11:56:13AM +0200, Vincent Guittot wrote:
> load_sum is now the average runnable time before being weighted

So when weight changes, load_avg will completely use new weight. I have
some cents:

1) Task does not change weight much, so it is practically ok

2) Group entity does change weight much, and very likely back and forth,
so I really think keeping the intact history will make everything
more predictable/stable, prevent thrashing, etc.

3) If you do the same for cfs_rq->load.weight, then we simply abandoned
blocked entities, and all states won't compute. So we then need to
maintain blocked load average again, and we just can't do cfs_rq load
average as a whole anymore, but must update at the granularity of an

Anyway, it does not seem to me you really need to change load_sum, no? So
could you please not change it?

> The sum of usage_sum of the tasks that are on a rq, is used to detect
> the overload of a rq.

I think you only need usage_sum for task and rq, but not cfs_rq. Others
are ok.

> Does something like the patch below to be applied of top of your patchset, seem
> reasonable add-on?

If you only add running statistics, I am all good, and indeed reasonable if
you can make good use of it. I am not at all against adding anything or
adding running average or unweighted anything...

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at