Re: [PATCH v5 5/7] sched: compute runnable load avg in cpu_load andcpu_avg_load_per_task

From: Alex Shi
Date: Tue May 07 2013 - 01:12:37 EST


On 05/07/2013 02:34 AM, Paul Turner wrote:
>> > Current load balance doesn't consider slept task's load which is
>> > represented by blocked_load_avg. And the slept task is not on_rq, so
>> > consider it in load balance is a little strange.
> The load-balancer has a longer time horizon; think of blocked_loag_avg
> to be a signal for the load, already assigned to this cpu, which is
> expected to appear (within roughly the next quantum).
>
> Consider the following scenario:
>
> tasks: A,B (40% busy), C (90% busy)
>
> Suppose we have:
> CPU 0: CPU 1:
> A C
> B
>
> Then, when C blocks the load balancer ticks.
>
> If we considered only runnable_load then A or B would be eligible for
> migration to CPU 1, which is essentially where we are today.
>

here is the changed patch according to Paul's comments. Is that you liked, Paul? :)

---