diff options
author | 2021-07-30 12:24:30 +0100 | |
---|---|---|
committer | 2021-08-20 12:32:59 +0200 | |
commit | 431c69fac05baa7477d61a44f2708e069f2bed6c (patch) | |
tree | 0a9b5e92c190187b22999f9065cb664408da5ffb /include/linux/cpuset.h | |
parent | cpuset: Don't use the cpu_possible_mask as a last resort for cgroup v1 (diff) | |
download | linux-431c69fac05baa7477d61a44f2708e069f2bed6c.tar.gz linux-431c69fac05baa7477d61a44f2708e069f2bed6c.tar.bz2 linux-431c69fac05baa7477d61a44f2708e069f2bed6c.zip |
cpuset: Honour task_cpu_possible_mask() in guarantee_online_cpus()
Asymmetric systems may not offer the same level of userspace ISA support
across all CPUs, meaning that some applications cannot be executed by
some CPUs. As a concrete example, upcoming arm64 big.LITTLE designs do
not feature support for 32-bit applications on both clusters.
Modify guarantee_online_cpus() to take task_cpu_possible_mask() into
account when trying to find a suitable set of online CPUs for a given
task. This will avoid passing an invalid mask to set_cpus_allowed_ptr()
during ->attach() and will subsequently allow the cpuset hierarchy to be
taken into account when forcefully overriding the affinity mask for a
task which requires migration to a compatible CPU.
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://lkml.kernel.org/r/20210730112443.23245-4-will@kernel.org
Diffstat (limited to 'include/linux/cpuset.h')
-rw-r--r-- | include/linux/cpuset.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index ed6ec677dd6b..414a8e694413 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h @@ -185,7 +185,7 @@ static inline void cpuset_read_unlock(void) { } static inline void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask) { - cpumask_copy(mask, cpu_possible_mask); + cpumask_copy(mask, task_cpu_possible_mask(p)); } static inline void cpuset_cpus_allowed_fallback(struct task_struct *p) |