summaryrefslogtreecommitdiff
path: root/kernel/sched
diff options
context:
space:
mode:
authorCon Kolivas <kernel@kolivas.org>2016-10-20 06:27:39 +1100
committerCon Kolivas <kernel@kolivas.org>2016-10-20 06:35:57 +1100
commit2460840c1bc37a42bac0c2a212520dce24a13ebd (patch)
tree322b7e2176cd09bb576189dffeb5059c8a8b6bf6 /kernel/sched
parent35d627902c2a150e7125f6ed53e73996dccb1a33 (diff)
Revert "Resched task when do_set_cpus_allowed is called from outside the scheduler code and drops affinity for the current cpu."
This reverts commit 2932e2b7075ff5b8fd96f8d9d03db8532efdfc9d.
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/MuQSS.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/kernel/sched/MuQSS.c b/kernel/sched/MuQSS.c
index e1fa0d1e63a9..e8101a32192f 100644
--- a/kernel/sched/MuQSS.c
+++ b/kernel/sched/MuQSS.c
@@ -5651,7 +5651,7 @@ void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_ma
p->nr_cpus_allowed = cpumask_weight(new_mask);
}
-static void __do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
+void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
{
struct rq *rq = task_rq(p);
@@ -5666,21 +5666,6 @@ static void __do_set_cpus_allowed(struct task_struct *p, const struct cpumask *n
*/
lockdep_assert_held(&rq->lock);
}
-}
-
-void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
-{
- __do_set_cpus_allowed(p, new_mask);
- if (needs_other_cpu(p, task_cpu(p))) {
- set_task_cpu(p, valid_task_cpu(p));
- resched_task(p);
- }
-}
-
-static void _do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
-{
- __do_set_cpus_allowed(p, new_mask);
- /* __set_cpus_allowed_ptr will handle the reschedule in this variant */
if (needs_other_cpu(p, task_cpu(p)))
set_task_cpu(p, valid_task_cpu(p));
}
@@ -5938,7 +5923,7 @@ static int __set_cpus_allowed_ptr(struct task_struct *p,
queued = task_queued(p);
- _do_set_cpus_allowed(p, new_mask);
+ do_set_cpus_allowed(p, new_mask);
if (p->flags & PF_KTHREAD) {
/*