]> git.baikalelectronics.ru Git - kernel.git/commit
sched: Introduce task_struct::user_cpus_ptr to track requested affinity
authorWill Deacon <will@kernel.org>
Fri, 30 Jul 2021 11:24:33 +0000 (12:24 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 20 Aug 2021 10:33:00 +0000 (12:33 +0200)
commit179dbbb3c17a585999e9978febeb0dd72ff7be6b
tree38cf3f80ceb6e2ae051c85fbb7b4696fecc90ed6
parentc1901d86ede6e55edffa4c236e28f7d5a3ac1ba3
sched: Introduce task_struct::user_cpus_ptr to track requested affinity

In preparation for saving and restoring the user-requested CPU affinity
mask of a task, add a new cpumask_t pointer to 'struct task_struct'.

If the pointer is non-NULL, then the mask is copied across fork() and
freed on task exit.

Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Valentin Schneider <Valentin.Schneider@arm.com>
Link: https://lore.kernel.org/r/20210730112443.23245-7-will@kernel.org
include/linux/sched.h
init/init_task.c
kernel/fork.c
kernel/sched/core.c