aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
authorSrivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>2007-10-15 11:00:09 -0400
committerIngo Molnar <mingo@elte.hu>2007-10-15 11:00:09 -0400
commit9b5b77512dce239fa168183fa71896712232e95a (patch)
tree2a95cf9151b4b6bd745236858f5b73b639dbc0d9 /kernel/sched_fair.c
parent75c28ace9f2b2f403674e045939424a77c95b47c (diff)
sched: clean up code under CONFIG_FAIR_GROUP_SCHED
With the view of supporting user-id based fair scheduling (and not just container-based fair scheduling), this patch renames several functions and makes them independent of whether they are being used for container or user-id based fair scheduling. Also fix a problem reported by KAMEZAWA Hiroyuki (wrt allocating less-sized array for tg->cfs_rq[] and tf->se[]). Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 556942cf2606..abd65ed9f2a5 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -877,7 +877,10 @@ static int cfs_rq_best_prio(struct cfs_rq *cfs_rq)
877 if (!cfs_rq->nr_running) 877 if (!cfs_rq->nr_running)
878 return MAX_PRIO; 878 return MAX_PRIO;
879 879
880 curr = __pick_next_entity(cfs_rq); 880 curr = cfs_rq->curr;
881 if (!curr)
882 curr = __pick_next_entity(cfs_rq);
883
881 p = task_of(curr); 884 p = task_of(curr);
882 885
883 return p->prio; 886 return p->prio;