summaryrefslogtreecommitdiffstats
path: root/kernel/sched/sched.h
diff options
context:
space:
mode:
authorWanpeng Li <wanpengli@tencent.com>2019-06-28 04:51:41 -0400
committerIngo Molnar <mingo@kernel.org>2019-07-25 09:51:55 -0400
commite0e8d4911ed2695b12c3a01c15634000ede9bc73 (patch)
treeb8979a4489332dc02e52988d52396627ab263fd6 /kernel/sched/sched.h
parent65d74e91694e1afac40c96fb64a9ef120757729e (diff)
sched/isolation: Prefer housekeeping CPU in local node
In real product setup, there will be houseeking CPUs in each nodes, it is prefer to do housekeeping from local node, fallback to global online cpumask if failed to find houseeking CPU from local node. Signed-off-by: Wanpeng Li <wanpengli@tencent.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/1561711901-4755-2-git-send-email-wanpengli@tencent.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r--kernel/sched/sched.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index aaca0e743776..16126efd14ed 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1262,16 +1262,18 @@ enum numa_topology_type {
1262extern enum numa_topology_type sched_numa_topology_type; 1262extern enum numa_topology_type sched_numa_topology_type;
1263extern int sched_max_numa_distance; 1263extern int sched_max_numa_distance;
1264extern bool find_numa_distance(int distance); 1264extern bool find_numa_distance(int distance);
1265#endif
1266
1267#ifdef CONFIG_NUMA
1268extern void sched_init_numa(void); 1265extern void sched_init_numa(void);
1269extern void sched_domains_numa_masks_set(unsigned int cpu); 1266extern void sched_domains_numa_masks_set(unsigned int cpu);
1270extern void sched_domains_numa_masks_clear(unsigned int cpu); 1267extern void sched_domains_numa_masks_clear(unsigned int cpu);
1268extern int sched_numa_find_closest(const struct cpumask *cpus, int cpu);
1271#else 1269#else
1272static inline void sched_init_numa(void) { } 1270static inline void sched_init_numa(void) { }
1273static inline void sched_domains_numa_masks_set(unsigned int cpu) { } 1271static inline void sched_domains_numa_masks_set(unsigned int cpu) { }
1274static inline void sched_domains_numa_masks_clear(unsigned int cpu) { } 1272static inline void sched_domains_numa_masks_clear(unsigned int cpu) { }
1273static inline int sched_numa_find_closest(const struct cpumask *cpus, int cpu)
1274{
1275 return nr_cpu_ids;
1276}
1275#endif 1277#endif
1276 1278
1277#ifdef CONFIG_NUMA_BALANCING 1279#ifdef CONFIG_NUMA_BALANCING