Message ID | 20220718124315.16648-2-tariqt@nvidia.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | mlx5: Use NUMA distance metrics | expand |
On Mon, Jul 18, 2022 at 03:43:14PM +0300, Tariq Toukan wrote: > This logic can help device drivers prefer some remote cpus > over others, according to the NUMA distance metrics. > > Reviewed-by: Gal Pressman <gal@nvidia.com> > Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> > --- > include/linux/sched/topology.h | 2 ++ > kernel/sched/topology.c | 1 + > 2 files changed, 3 insertions(+) > > v2: > Replaced EXPORT_SYMBOL with EXPORT_SYMBOL_GPL, per Peter's comment. > > diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h > index 56cffe42abbc..d467c30bdbb9 100644 > --- a/include/linux/sched/topology.h > +++ b/include/linux/sched/topology.h > @@ -61,6 +61,8 @@ static inline int cpu_numa_flags(void) > { > return SD_NUMA; > } > + > +int sched_numa_find_closest(const struct cpumask *cpus, int cpu); > #endif > > extern int arch_asym_cpu_priority(int cpu); > diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c > index 05b6c2ad90b9..274fb2bd3849 100644 > --- a/kernel/sched/topology.c > +++ b/kernel/sched/topology.c > @@ -2066,6 +2066,7 @@ int sched_numa_find_closest(const struct cpumask *cpus, int cpu) > > return found; > } > +EXPORT_SYMBOL_GPL(sched_numa_find_closest); > > #endif /* CONFIG_NUMA */ > > -- > 2.21.0 >
diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h index 56cffe42abbc..d467c30bdbb9 100644 --- a/include/linux/sched/topology.h +++ b/include/linux/sched/topology.h @@ -61,6 +61,8 @@ static inline int cpu_numa_flags(void) { return SD_NUMA; } + +int sched_numa_find_closest(const struct cpumask *cpus, int cpu); #endif extern int arch_asym_cpu_priority(int cpu); diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 05b6c2ad90b9..274fb2bd3849 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -2066,6 +2066,7 @@ int sched_numa_find_closest(const struct cpumask *cpus, int cpu) return found; } +EXPORT_SYMBOL_GPL(sched_numa_find_closest); #endif /* CONFIG_NUMA */