lkml.org 
[lkml]   [2017]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH] sched: Optimize pick_next_task for idle_sched_class too
    On Thu, Feb 23, 2017 at 04:25:33PM +0100, Peter Zijlstra wrote:
    >
    > Ah, I read your question wrong. Yes I think you're right, we now loose
    > the pull when the last RT task goes away.
    >
    > Hmm.. how to fix that nicely..

    Something like so perhaps? This would make a pull happen when the last
    RT task on this CPU goes away.

    Steve?

    ---
    diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
    index 9f3e40226dec..283d591078b0 100644
    --- a/kernel/sched/rt.c
    +++ b/kernel/sched/rt.c
    @@ -1336,6 +1336,9 @@ static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int flags)
    dequeue_rt_entity(rt_se, flags);

    dequeue_pushable_task(rq, p);
    +
    + if (!rq->rt.rt_nr_running)
    + queue_pull_task(rq);
    }

    /*
    \
     
     \ /
      Last update: 2017-02-23 17:38    [W:3.233 / U:0.140 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site