lkml.org 
[lkml]   [2021]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 4/5] sched/fair: Remove sysctl_sched_migration_cost condition
    Date
    With a default value of 500us, sysctl_sched_migration_cost is
    significanlty higher than the cost of load_balance. Remove the
    condition and rely on the sd->max_newidle_lb_cost to abort
    newidle_balance.

    Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
    ---
    kernel/sched/fair.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
    index e50fd751e1df..57eae0ebc492 100644
    --- a/kernel/sched/fair.c
    +++ b/kernel/sched/fair.c
    @@ -10895,8 +10895,7 @@ static int newidle_balance(struct rq *this_rq, struct rq_flags *rf)
    rcu_read_lock();
    sd = rcu_dereference_check_sched_domain(this_rq->sd);

    - if (this_rq->avg_idle < sysctl_sched_migration_cost ||
    - !READ_ONCE(this_rq->rd->overload) ||
    + if (!READ_ONCE(this_rq->rd->overload) ||
    (sd && this_rq->avg_idle < sd->max_newidle_lb_cost)) {

    if (sd)
    --
    2.17.1
    \
     
     \ /
      Last update: 2021-10-19 14:36    [W:4.091 / U:0.080 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site