|
|
@@ -1696,13 +1696,6 @@ static void set_cpus_allowed_dl(struct task_struct *p,
|
|
|
raw_spin_unlock(&src_dl_b->lock);
|
|
|
}
|
|
|
|
|
|
- /*
|
|
|
- * Update only if the task is actually running (i.e.,
|
|
|
- * it is on the rq AND it is not throttled).
|
|
|
- */
|
|
|
- if (!on_dl_rq(&p->dl))
|
|
|
- return;
|
|
|
-
|
|
|
weight = cpumask_weight(new_mask);
|
|
|
|
|
|
/*
|
|
|
@@ -1710,7 +1703,14 @@ static void set_cpus_allowed_dl(struct task_struct *p,
|
|
|
* can migrate or not.
|
|
|
*/
|
|
|
if ((p->nr_cpus_allowed > 1) == (weight > 1))
|
|
|
- return;
|
|
|
+ goto done;
|
|
|
+
|
|
|
+ /*
|
|
|
+ * Update only if the task is actually running (i.e.,
|
|
|
+ * it is on the rq AND it is not throttled).
|
|
|
+ */
|
|
|
+ if (!on_dl_rq(&p->dl))
|
|
|
+ goto done;
|
|
|
|
|
|
/*
|
|
|
* The process used to be able to migrate OR it can now migrate
|
|
|
@@ -1727,6 +1727,10 @@ static void set_cpus_allowed_dl(struct task_struct *p,
|
|
|
}
|
|
|
|
|
|
update_dl_migration(&rq->dl);
|
|
|
+
|
|
|
+done:
|
|
|
+ cpumask_copy(&p->cpus_allowed, new_mask);
|
|
|
+ p->nr_cpus_allowed = weight;
|
|
|
}
|
|
|
|
|
|
/* Assumes rq->lock is held */
|