summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel
diff options
context:
space:
mode:
authorFrederic Weisbecker <frederic@kernel.org>2024-09-27 00:48:59 +0200
committerFrederic Weisbecker <frederic@kernel.org>2025-01-08 18:14:23 +0100
commit3a5446612a3f2579c751ddb77c5e16b9a0d47001 (patch)
tree85821711656799136a08430662f71e211a936463 /arch/arm64/kernel
parent4a1567b466ecaa411cfe54c82009de7899e96171 (diff)
downloadlinux-3a5446612a3f2579c751ddb77c5e16b9a0d47001.tar.gz
linux-3a5446612a3f2579c751ddb77c5e16b9a0d47001.tar.bz2
linux-3a5446612a3f2579c751ddb77c5e16b9a0d47001.zip
sched,arm64: Handle CPU isolation on last resort fallback rq selection
When a kthread or any other task has an affinity mask that is fully offline or unallowed, the scheduler reaffines the task to all possible CPUs as a last resort. This default decision doesn't mix up very well with nohz_full CPUs that are part of the possible cpumask but don't want to be disturbed by unbound kthreads or even detached pinned user tasks. Make the fallback affinity setting aware of nohz_full. Suggested-by: Michal Hocko <mhocko@suse.com> Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r--arch/arm64/kernel/cpufeature.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index 3c87659c14db..a983e8660987 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -1642,6 +1642,11 @@ const struct cpumask *system_32bit_el0_cpumask(void)
return cpu_possible_mask;
}
+const struct cpumask *task_cpu_fallback_mask(struct task_struct *p)
+{
+ return __task_cpu_possible_mask(p, housekeeping_cpumask(HK_TYPE_TICK));
+}
+
static int __init parse_32bit_el0_param(char *str)
{
allow_mismatched_32bit_el0 = true;