diff options
author | ckolivas <kernel@kolivas.org> | 2016-11-11 06:39:08 +1100 |
---|---|---|
committer | ckolivas <kernel@kolivas.org> | 2016-11-11 06:49:09 +1100 |
commit | bc845c26da28d147f8680ba0833dd2f0c7b2b607 (patch) | |
tree | 9f3ecdc1f62e02525c2ec08bea17a738eba85a14 /kernel/sched | |
parent | ca26845fc738196192dabf7dcc90f3c77636f628 (diff) |
Only force a direct schedule in __set_cpus_allowed_ptr on kthreads.
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/MuQSS.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/sched/MuQSS.c b/kernel/sched/MuQSS.c index 32fb51e5bfff..e1b2c8b2e5f5 100644 --- a/kernel/sched/MuQSS.c +++ b/kernel/sched/MuQSS.c @@ -5682,16 +5682,16 @@ static int __set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask, bool check) { const struct cpumask *cpu_valid_mask = cpu_active_mask; - bool running_wrong = false; + bool queued = false, running_wrong = false, kthread; struct cpumask old_mask; - bool queued = false; unsigned long flags; struct rq *rq; int ret = 0; rq = task_rq_lock(p, &flags); - if (p->flags & PF_KTHREAD) { + kthread = !!(p->flags & PF_KTHREAD); + if (kthread) { /* * Kernel threads are allowed on online && !active CPUs */ @@ -5720,7 +5720,7 @@ static int __set_cpus_allowed_ptr(struct task_struct *p, _do_set_cpus_allowed(p, new_mask); - if (p->flags & PF_KTHREAD) { + if (kthread) { /* * For kernel threads that do indeed end up on online && * !active we want to ensure they are strict per-cpu threads. @@ -5738,7 +5738,7 @@ static int __set_cpus_allowed_ptr(struct task_struct *p, /* Task is running on the wrong cpu now, reschedule it. */ if (rq == this_rq()) { set_tsk_need_resched(p); - running_wrong = true; + running_wrong = kthread; } else resched_task(p); } else { |