aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-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'.