|
|
@@ -6187,10 +6187,10 @@ pick_next_task_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf
|
|
|
int new_tasks;
|
|
|
|
|
|
again:
|
|
|
-#ifdef CONFIG_FAIR_GROUP_SCHED
|
|
|
if (!cfs_rq->nr_running)
|
|
|
goto idle;
|
|
|
|
|
|
+#ifdef CONFIG_FAIR_GROUP_SCHED
|
|
|
if (prev->sched_class != &fair_sched_class)
|
|
|
goto simple;
|
|
|
|
|
|
@@ -6220,11 +6220,17 @@ again:
|
|
|
/*
|
|
|
* This call to check_cfs_rq_runtime() will do the
|
|
|
* throttle and dequeue its entity in the parent(s).
|
|
|
- * Therefore the 'simple' nr_running test will indeed
|
|
|
+ * Therefore the nr_running test will indeed
|
|
|
* be correct.
|
|
|
*/
|
|
|
- if (unlikely(check_cfs_rq_runtime(cfs_rq)))
|
|
|
+ if (unlikely(check_cfs_rq_runtime(cfs_rq))) {
|
|
|
+ cfs_rq = &rq->cfs;
|
|
|
+
|
|
|
+ if (!cfs_rq->nr_running)
|
|
|
+ goto idle;
|
|
|
+
|
|
|
goto simple;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
se = pick_next_entity(cfs_rq, curr);
|
|
|
@@ -6264,12 +6270,8 @@ again:
|
|
|
|
|
|
return p;
|
|
|
simple:
|
|
|
- cfs_rq = &rq->cfs;
|
|
|
#endif
|
|
|
|
|
|
- if (!cfs_rq->nr_running)
|
|
|
- goto idle;
|
|
|
-
|
|
|
put_prev_task(rq, prev);
|
|
|
|
|
|
do {
|