Merge branch 'smp/hotplug' into sched/core, to resolve conflicts
authorIngo Molnar <mingo@kernel.org>
Thu, 12 May 2016 07:51:36 +0000 (09:51 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 12 May 2016 07:51:36 +0000 (09:51 +0200)
Conflicts:
kernel/sched/core.c

Signed-off-by: Ingo Molnar <mingo@kernel.org>
1  2 
include/linux/sched.h
kernel/sched/core.c
kernel/sched/fair.c
kernel/sched/sched.h

Simple merge
index e09f92c3a096d0eefeb005da0d92582a65c62ee9,9c710ad0ac22bde2ffc479dddc8e47a46b7da57c..1e622f254df41d04a2b1a6c28c056c9cbb4ba3cf
@@@ -1150,13 -1051,21 +1119,21 @@@ void do_set_cpus_allowed(struct task_st
  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;
        unsigned int dest_cpu;
 -      unsigned long flags;
 +      struct rq_flags rf;
        struct rq *rq;
        int ret = 0;
  
 -      rq = task_rq_lock(p, &flags);
 +      rq = task_rq_lock(p, &rf);
  
+       if (p->flags & PF_KTHREAD) {
+               /*
+                * Kernel threads are allowed on online && !active CPUs
+                */
+               cpu_valid_mask = cpu_online_mask;
+       }
        /*
         * Must re-check here, to close a race against __kthread_bind(),
         * sched_setaffinity() is not guaranteed to observe the flag.
Simple merge
Simple merge