Messages in this thread Patch in this message | | | Date | Sat, 28 Mar 2020 12:21:18 -0300 | From | Marcelo Tosatti <> | Subject | [patch 1/3] kthread: switch to cpu_possible_mask |
| |
Next patch will switch unbound kernel threads mask to housekeeping_cpumask(), a subset of cpu_possible_mask.
Switch from cpu_all_mask to cpu_possible_mask separately, to ease bisection.
Suggested-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
--- kernel/kthread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6/kernel/kthread.c =================================================================== --- linux-2.6.orig/kernel/kthread.c +++ linux-2.6/kernel/kthread.c @@ -347,7 +347,7 @@ struct task_struct *__kthread_create_on_ * The kernel thread should not inherit these properties. */ sched_setscheduler_nocheck(task, SCHED_NORMAL, ¶m); - set_cpus_allowed_ptr(task, cpu_all_mask); + set_cpus_allowed_ptr(task, cpu_possible_mask); } kfree(create); return task; @@ -572,7 +572,7 @@ int kthreadd(void *unused) /* Setup a clean context for our children to inherit. */ set_task_comm(tsk, "kthreadd"); ignore_signals(tsk); - set_cpus_allowed_ptr(tsk, cpu_all_mask); + set_cpus_allowed_ptr(tsk, cpu_possible_mask); set_mems_allowed(node_states[N_MEMORY]); current->flags |= PF_NOFREEZE;
| |