diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-07 10:03:43 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-07 10:03:43 -0800 |
commit | 6fed85df5d097298d265dfcc31cf1e0c1633f41e (patch) | |
tree | 030cf03d82710ee3ffb8e8cbad3a99091da76994 /lib | |
parent | 814daadbf09a364ec22f5aba769e01d8fa339c31 (diff) | |
parent | 2452483d9546de1c540f330469dc4042ff089731 (diff) | |
download | linux-stable-6fed85df5d097298d265dfcc31cf1e0c1633f41e.tar.gz linux-stable-6fed85df5d097298d265dfcc31cf1e0c1633f41e.tar.bz2 linux-stable-6fed85df5d097298d265dfcc31cf1e0c1633f41e.zip |
Merge tag 'sched_urgent_for_v5.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fix from Borislav Petkov:
"Revert an attempt to not spread IRQ threads on isolated CPUs which has
a bunch of problems"
* tag 'sched_urgent_for_v5.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
Revert "lib: Restrict cpumask_local_spread to houskeeping CPUs"
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cpumask.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/cpumask.c b/lib/cpumask.c index 35924025097b..c3c76b833384 100644 --- a/lib/cpumask.c +++ b/lib/cpumask.c @@ -6,7 +6,6 @@ #include <linux/export.h> #include <linux/memblock.h> #include <linux/numa.h> -#include <linux/sched/isolation.h> /** * cpumask_next - get the next cpu in a cpumask @@ -206,27 +205,22 @@ void __init free_bootmem_cpumask_var(cpumask_var_t mask) */ unsigned int cpumask_local_spread(unsigned int i, int node) { - int cpu, hk_flags; - const struct cpumask *mask; + int cpu; - hk_flags = HK_FLAG_DOMAIN | HK_FLAG_MANAGED_IRQ; - mask = housekeeping_cpumask(hk_flags); /* Wrap: we always want a cpu. */ - i %= cpumask_weight(mask); + i %= num_online_cpus(); if (node == NUMA_NO_NODE) { - for_each_cpu(cpu, mask) { + for_each_cpu(cpu, cpu_online_mask) if (i-- == 0) return cpu; - } } else { /* NUMA first. */ - for_each_cpu_and(cpu, cpumask_of_node(node), mask) { + for_each_cpu_and(cpu, cpumask_of_node(node), cpu_online_mask) if (i-- == 0) return cpu; - } - for_each_cpu(cpu, mask) { + for_each_cpu(cpu, cpu_online_mask) { /* Skip NUMA nodes, done above. */ if (cpumask_test_cpu(cpu, cpumask_of_node(node))) continue; |