Skip to content

Commit 6fed85d

Browse files
committed
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"
2 parents 814daad + 2452483 commit 6fed85d

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

lib/cpumask.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <linux/export.h>
77
#include <linux/memblock.h>
88
#include <linux/numa.h>
9-
#include <linux/sched/isolation.h>
109

1110
/**
1211
* cpumask_next - get the next cpu in a cpumask
@@ -206,27 +205,22 @@ void __init free_bootmem_cpumask_var(cpumask_var_t mask)
206205
*/
207206
unsigned int cpumask_local_spread(unsigned int i, int node)
208207
{
209-
int cpu, hk_flags;
210-
const struct cpumask *mask;
208+
int cpu;
211209

212-
hk_flags = HK_FLAG_DOMAIN | HK_FLAG_MANAGED_IRQ;
213-
mask = housekeeping_cpumask(hk_flags);
214210
/* Wrap: we always want a cpu. */
215-
i %= cpumask_weight(mask);
211+
i %= num_online_cpus();
216212

217213
if (node == NUMA_NO_NODE) {
218-
for_each_cpu(cpu, mask) {
214+
for_each_cpu(cpu, cpu_online_mask)
219215
if (i-- == 0)
220216
return cpu;
221-
}
222217
} else {
223218
/* NUMA first. */
224-
for_each_cpu_and(cpu, cpumask_of_node(node), mask) {
219+
for_each_cpu_and(cpu, cpumask_of_node(node), cpu_online_mask)
225220
if (i-- == 0)
226221
return cpu;
227-
}
228222

229-
for_each_cpu(cpu, mask) {
223+
for_each_cpu(cpu, cpu_online_mask) {
230224
/* Skip NUMA nodes, done above. */
231225
if (cpumask_test_cpu(cpu, cpumask_of_node(node)))
232226
continue;

0 commit comments

Comments
 (0)