From 8fba2ed7c6d04c2113ac62666f89e9ef5f69c8b5 Mon Sep 17 00:00:00 2001 From: Youngtae Lee Date: Wed, 28 Jun 2017 03:35:54 -0700 Subject: [PATCH] [9820] sched: core: fix bug that rt could not be binded to little Current rt little binding code is working when target task is on runqueue. Remove this condition to all rt tasks bind to little. Change-Id: I2f1883e2e8dffef25920848f6ef87b38a231ff0c Signed-off-by: Youngtae Lee --- kernel/sched/core.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index bc0339a4a4dd..c5a151148b01 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4293,6 +4293,15 @@ change: if (running) set_curr_task(rq, p); + if (p->sched_class == &rt_sched_class) { + struct cpumask mask; + + cpumask_andnot(&mask, &p->cpus_allowed, cpu_coregroup_mask(4)); + cpumask_andnot(&mask, &p->cpus_allowed, cpu_coregroup_mask(6)); + if (!cpumask_empty(&mask)) + do_set_cpus_allowed(p, &mask); + } + check_class_changed(rq, p, prev_class, oldprio); /* Avoid rq from going away on us: */ -- 2.20.1