lkml.org 
[lkml]   [2013]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC][PATCH 5/7] sched: power: Increase cpu capacity based on rq tracked load
    Date
    weighted_cpuload() gives the sum of priority scaled task loads. One
    NICE 0 task is not be enough load to trigger a cpu capacity increase
    when cpu_power > 1024. The rq->avg.runnable_avg_sum tracks the actual
    busy time of the cpu and is therefore a more accurate indication of
    the cpu load. If the rq tracked load is high the cpu is busy even if
    the weighted_cpuload() should indicate otherwise.

    Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com>
    ---
    kernel/sched/fair.c | 12 +++++++++++-
    1 file changed, 11 insertions(+), 1 deletion(-)

    diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
    index ea8d973..ee87e65 100644
    --- a/kernel/sched/fair.c
    +++ b/kernel/sched/fair.c
    @@ -2861,7 +2861,17 @@ static inline void inc_cpu_capacity(int cpu, struct task_struct *p)
    if (p && p->flags & PF_WQ_WORKER)
    return;

    - if (weighted_cpuload(cpu) > power_of(cpu))
    + if (weighted_cpuload(cpu) > power_of(cpu)) {
    + go_faster(cpu, 0);
    + return;
    + }
    +
    + /*
    + * Go faster if the cpu is 80% busy. This threshold should
    + * be set by the power driver later.
    + */
    + if (cpu_rq(cpu)->avg.runnable_avg_sum * 100 >
    + 80 * cpu_rq(cpu)->avg.runnable_avg_period)
    go_faster(cpu, 0);
    }

    --
    1.7.9.5



    \
     
     \ /
      Last update: 2013-10-11 19:41    [W:2.186 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site