mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
Revert "sched/deadline: Remove cpu_active_mask from cpudl_find()"
This reverts commit 9659e1ee. The change leaves a possibility of
scheduling dl task on offline cpu. The original commit text suggests
that it should not be a problem since migrate_tasks() will take care of
it, but there can be delay between marking cpu as offline and
migrate_tasks() call since they are called on different hotplug
notifications-offline happens on CPUHP_TEARDOWN_CPU while
migrate_tasks() gets called on CPUHP_AP_SCHED_STARTING. And in
between this duration there is a chance the dl task can get scheduled on
this offline cpu and lead to BUG_ON. Hence revert the change.
Change-Id: I6f4ea10d2ce4e83e12d36b9b90b1b630ffe4fc74
[pujag@codeaurora.org: fix minor conflicts due to reorg of the code]
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
[satyap@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
This commit is contained in:
parent
3f223d4909
commit
44d528b138
1 changed files with 3 additions and 1 deletions
|
|
@ -120,7 +120,8 @@ int cpudl_find(struct cpudl *cp, struct task_struct *p,
|
|||
const struct sched_dl_entity *dl_se = &p->dl;
|
||||
|
||||
if (later_mask &&
|
||||
cpumask_and(later_mask, cp->free_cpus, p->cpus_ptr)) {
|
||||
cpumask_and(later_mask, cp->free_cpus, p->cpus_ptr) &&
|
||||
cpumask_and(later_mask, later_mask, cpu_active_mask)) {
|
||||
return 1;
|
||||
} else {
|
||||
int best_cpu = cpudl_maximum(cp);
|
||||
|
|
@ -128,6 +129,7 @@ int cpudl_find(struct cpudl *cp, struct task_struct *p,
|
|||
WARN_ON(best_cpu != -1 && !cpu_present(best_cpu));
|
||||
|
||||
if (cpumask_test_cpu(best_cpu, p->cpus_ptr) &&
|
||||
cpumask_test_cpu(best_cpu, cpu_active_mask) &&
|
||||
dl_time_before(dl_se->deadline, cp->elements[0].dl)) {
|
||||
if (later_mask)
|
||||
cpumask_set_cpu(best_cpu, later_mask);
|
||||
|
|
|
|||
Loading…
Reference in a new issue