• Steven Rostedt's avatar
    sched: add RT task pushing · e8fa1362
    Steven Rostedt authored
    This patch adds an algorithm to push extra RT tasks off a run queue to
    other CPU runqueues.
    
    When more than one RT task is added to a run queue, this algorithm takes
    an assertive approach to push the RT tasks that are not running onto other
    run queues that have lower priority.  The way this works is that the highest
    RT task that is not running is looked at and we examine the runqueues on
    the CPUS for that tasks affinity mask. We find the runqueue with the lowest
    prio in the CPU affinity of the picked task, and if it is lower in prio than
    the picked task, we push the task onto that CPU runqueue.
    
    We continue pushing RT tasks off the current runqueue until we don't push any
    more.  The algorithm stops when the next highest RT task can't preempt any
    other processes on other CPUS.
    
    TODO: The algorithm may stop when there are still RT tasks that can be
     migrated. Specifically, if the highest non running RT task CPU affinity
     is restricted to CPUs that are running higher priority tasks, there may
     be a lower priority task queued that has an affinity with a CPU that is
     running a lower priority task that it could be migrated to.  This
     patch set does not address this issue.
    
    Note: checkpatch reveals two over 80 character instances. I'm not sure
     that breaking them up will help visually, so I left them as is.
    Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    e8fa1362
sched_rt.c 12.3 KB