|
@@ -1007,13 +1007,14 @@ static void task_new_fair(struct rq *rq, struct task_struct *p)
|
|
{
|
|
{
|
|
struct cfs_rq *cfs_rq = task_cfs_rq(p);
|
|
struct cfs_rq *cfs_rq = task_cfs_rq(p);
|
|
struct sched_entity *se = &p->se, *curr = cfs_rq->curr;
|
|
struct sched_entity *se = &p->se, *curr = cfs_rq->curr;
|
|
|
|
+ int this_cpu = smp_processor_id();
|
|
|
|
|
|
sched_info_queued(p);
|
|
sched_info_queued(p);
|
|
|
|
|
|
update_curr(cfs_rq);
|
|
update_curr(cfs_rq);
|
|
place_entity(cfs_rq, se, 1);
|
|
place_entity(cfs_rq, se, 1);
|
|
|
|
|
|
- if (sysctl_sched_child_runs_first &&
|
|
|
|
|
|
+ if (sysctl_sched_child_runs_first && this_cpu == task_cpu(p) &&
|
|
curr->vruntime < se->vruntime) {
|
|
curr->vruntime < se->vruntime) {
|
|
/*
|
|
/*
|
|
* Upon rescheduling, sched_class::put_prev_task() will place
|
|
* Upon rescheduling, sched_class::put_prev_task() will place
|