lkml.org 
[lkml]   [2017]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH RESEND v3 2/5] sched/fair: Remove unnecessary comparison with -1
    Date
    Since commit 83a0a96a5f26 ("sched/fair: Leverage the idle state info
    when choosing the "idlest" cpu") find_idlest_grou_cpu (formerly
    find_idlest_cpu) no longer returns -1.

    Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
    Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
    Cc: Vincent Guittot <vincent.guittot@linaro.org>
    Cc: Josef Bacik <josef@toxicpanda.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Morten Rasmussen <morten.rasmussen@arm.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Reviewed-by: Josef Bacik <jbacik@fb.com>
    Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
    ---
    kernel/sched/fair.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
    index 7df72795b20b..8b12c76a8b62 100644
    --- a/kernel/sched/fair.c
    +++ b/kernel/sched/fair.c
    @@ -5971,7 +5971,7 @@ static inline int find_idlest_cpu(struct sched_domain *sd, struct task_struct *p
    }

    new_cpu = find_idlest_group_cpu(group, p, cpu);
    - if (new_cpu == -1 || new_cpu == cpu) {
    + if (new_cpu == cpu) {
    /* Now try balancing at a lower domain level of cpu */
    sd = sd->child;
    continue;
    --
    2.14.1
    \
     
     \ /
      Last update: 2017-10-05 13:47    [W:4.718 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site