diff options
Diffstat (limited to 'kernel/sched/isolation.c')
-rw-r--r-- | kernel/sched/isolation.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c index ccb28085b114..9fcb2a695a41 100644 --- a/kernel/sched/isolation.c +++ b/kernel/sched/isolation.c | |||
@@ -22,9 +22,17 @@ EXPORT_SYMBOL_GPL(housekeeping_enabled); | |||
22 | 22 | ||
23 | int housekeeping_any_cpu(enum hk_flags flags) | 23 | int housekeeping_any_cpu(enum hk_flags flags) |
24 | { | 24 | { |
25 | if (static_branch_unlikely(&housekeeping_overridden)) | 25 | int cpu; |
26 | if (housekeeping_flags & flags) | 26 | |
27 | if (static_branch_unlikely(&housekeeping_overridden)) { | ||
28 | if (housekeeping_flags & flags) { | ||
29 | cpu = sched_numa_find_closest(housekeeping_mask, smp_processor_id()); | ||
30 | if (cpu < nr_cpu_ids) | ||
31 | return cpu; | ||
32 | |||
27 | return cpumask_any_and(housekeeping_mask, cpu_online_mask); | 33 | return cpumask_any_and(housekeeping_mask, cpu_online_mask); |
34 | } | ||
35 | } | ||
28 | return smp_processor_id(); | 36 | return smp_processor_id(); |
29 | } | 37 | } |
30 | EXPORT_SYMBOL_GPL(housekeeping_any_cpu); | 38 | EXPORT_SYMBOL_GPL(housekeeping_any_cpu); |