aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-12-04 11:04:39 -0500
committerIngo Molnar <mingo@elte.hu>2007-12-04 11:04:39 -0500
commitdb292ca302e83534f5f0f7139e13d7e6976e51f9 (patch)
tree5d217514330e447b82f07601cdc87e6fd135d76b /kernel/sched_fair.c
parent77034937dc4575ca0a76bf209838ecd39e804089 (diff)
sched: default to more agressive yield for SCHED_BATCH tasks
do more agressive yield for SCHED_BATCH tuned tasks: they are all about throughput anyway. This allows a gentler migration path for any apps that relied on stronger yield. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 37bb265598db..c33f0ceb3de9 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -799,8 +799,9 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int sleep)
799 */ 799 */
800static void yield_task_fair(struct rq *rq) 800static void yield_task_fair(struct rq *rq)
801{ 801{
802 struct cfs_rq *cfs_rq = task_cfs_rq(rq->curr); 802 struct task_struct *curr = rq->curr;
803 struct sched_entity *rightmost, *se = &rq->curr->se; 803 struct cfs_rq *cfs_rq = task_cfs_rq(curr);
804 struct sched_entity *rightmost, *se = &curr->se;
804 805
805 /* 806 /*
806 * Are we the only task in the tree? 807 * Are we the only task in the tree?
@@ -808,7 +809,7 @@ static void yield_task_fair(struct rq *rq)
808 if (unlikely(cfs_rq->nr_running == 1)) 809 if (unlikely(cfs_rq->nr_running == 1))
809 return; 810 return;
810 811
811 if (likely(!sysctl_sched_compat_yield)) { 812 if (likely(!sysctl_sched_compat_yield) && curr->policy != SCHED_BATCH) {
812 __update_rq_clock(rq); 813 __update_rq_clock(rq);
813 /* 814 /*
814 * Update run-time statistics of the 'current'. 815 * Update run-time statistics of the 'current'.