Skip to content
  • Dmitry Adamushko's avatar
    sched: optimize task_tick_rt() a bit · 98fbc798
    Dmitry Adamushko authored
    
    
    Mitchell Erblich suggested a quality-of-implementation change to
    not requeue SCHED_RR tasks if there's only a single task on the
    runqueue, by checking for rq->nr_running == 1.
    
    provide a more efficient implementation of that, to check that
    particular RT priority-queue only.
    
    [ From: mingo@elte.hu ]
    
    Also first requeue the task then set need_resched - results in slightly
    better machine-instruction ordering. Also clean up the code a bit.
    
    Signed-off-by: default avatarDmitry Adamushko <dmitry.adamushko@gmail.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    98fbc798