[9820] sched: core: fix bug that rt could not be binded to little
authorYoungtae Lee <yt0729.lee@samsung.com>
Wed, 28 Jun 2017 10:35:54 +0000 (03:35 -0700)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:33:18 +0000 (17:33 +0900)
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 <yt0729.lee@samsung.com>
kernel/sched/core.c

index bc0339a4a4dd569cd52bb77c1b90de2e54349848..c5a151148b01e01573a26d94c94e667505226718 100644 (file)
@@ -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: */