aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 357d3a084de8..66e99b419b31 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -343,6 +343,7 @@ struct rt_rq {
343 int rt_load_balance_idx; 343 int rt_load_balance_idx;
344 struct list_head *rt_load_balance_head, *rt_load_balance_curr; 344 struct list_head *rt_load_balance_head, *rt_load_balance_curr;
345 unsigned long rt_nr_running; 345 unsigned long rt_nr_running;
346 unsigned long rt_nr_migratory;
346 /* highest queued rt task prio */ 347 /* highest queued rt task prio */
347 int highest_prio; 348 int highest_prio;
348}; 349};
@@ -5144,7 +5145,13 @@ int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
5144 goto out; 5145 goto out;
5145 } 5146 }
5146 5147
5147 p->cpus_allowed = new_mask; 5148 if (p->sched_class->set_cpus_allowed)
5149 p->sched_class->set_cpus_allowed(p, &new_mask);
5150 else {
5151 p->cpus_allowed = new_mask;
5152 p->nr_cpus_allowed = cpus_weight(new_mask);
5153 }
5154
5148 /* Can the task run on the task's current CPU? If so, we're done */ 5155 /* Can the task run on the task's current CPU? If so, we're done */
5149 if (cpu_isset(task_cpu(p), new_mask)) 5156 if (cpu_isset(task_cpu(p), new_mask))
5150 goto out; 5157 goto out;