Re: [ANNOUNCE] 4.4-rc6-rt1

From: Mike Galbraith
Date: Sat Jan 16 2016 - 08:24:14 EST


On Thu, 2016-01-14 at 17:05 +0100, Mike Galbraith wrote:

> This is virgin -rt1 modulo fixlet applied to v4.4.0, built with the
> .config from v4.4.0 that built it (modulo RT_FULL) rebuilding itself
> via make -j8.
>
> homer:/root # vmstat 10
> procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
> r b swpd free buff cache si so bi bo in cs us sy id wa st
> 0 1 0 14742988 179832 680792 0 0 634 25 326 1196 2 1 89 8 0
> 8 0 0 14476084 179848 701632 0 0 814 525 2421 12314 11 1 87 1 0
> 8 0 0 14483232 179864 712656 0 0 165 1628 2404 12320 11 1 87 1 0
> 8 0 0 14493336 180008 727836 0 0 141 762 2328 11306 11 1 87 0 0
> 8 0 0 14456436 180024 738356 0 0 159 1478 2336 11939 11 1 87 0 0
>
> Way too idle, taking forever.

It now being the weekend...

sched: Disable default set_cpus_allowed() method during update_migrate_disable().

update_migrate_disable() calls class::set_cpus_allowed(), when that method
is set_cpus_allowed_common(), writing to ->cpus_allowed defeats the intent
of migrate_disable(), permanently disabling migration instead.

Signed-off-by: Mike Galbraith <umgwanakikbuti@xxxxxxxxx>
---
kernel/sched/core.c | 2 ++
1 file changed, 2 insertions(+)

--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1205,6 +1205,8 @@ static int migration_cpu_stop(void *data
*/
void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_mask)
{
+ if (__migrate_disabled(p))
+ return;
cpumask_copy(&p->cpus_allowed, new_mask);
p->nr_cpus_allowed = cpumask_weight(new_mask);
}