summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c4
-rw-r--r--kernel/sched_debug.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index eff6bbe2a4dd..3baf3de6de8e 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6376,12 +6376,14 @@ void migrate_enable(void)
*/
rq = this_rq();
raw_spin_lock_irqsave(&rq->lock, flags);
- p->migrate_disable = 0;
mask = tsk_cpus_allowed(p);
+ p->migrate_disable = 0;
WARN_ON(!cpumask_test_cpu(smp_processor_id(), mask));
if (!cpumask_equal(&p->cpus_allowed, mask)) {
+ /* Get the mask now that migration is enabled */
+ mask = tsk_cpus_allowed(p);
if (p->sched_class->set_cpus_allowed)
p->sched_class->set_cpus_allowed(p, mask);
p->rt.nr_cpus_allowed = cpumask_weight(mask);
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index a6710a112b4f..528032b18655 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -235,6 +235,9 @@ void print_rt_rq(struct seq_file *m, int cpu, struct rt_rq *rt_rq)
P(rt_throttled);
PN(rt_time);
PN(rt_runtime);
+#ifdef CONFIG_SMP
+ P(rt_nr_migratory);
+#endif
#undef PN
#undef P
@@ -484,6 +487,10 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
P(se.load.weight);
P(policy);
P(prio);
+#ifdef CONFIG_PREEMPT_RT_FULL
+ P(migrate_disable);
+#endif
+ P(rt.nr_cpus_allowed);
#undef PN
#undef __PN
#undef P