All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next V4 0/3] Introduce and use NUMA distance metrics
@ 2022-07-28 19:12 Tariq Toukan
  2022-07-28 19:12 ` [PATCH net-next V4 1/3] sched/topology: Add NUMA-based CPUs spread API Tariq Toukan
                   ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Tariq Toukan @ 2022-07-28 19:12 UTC (permalink / raw)
  To: David S. Miller, Saeed Mahameed, Jakub Kicinski, Ingo Molnar,
	Peter Zijlstra, Juri Lelli
  Cc: Eric Dumazet, Paolo Abeni, netdev, Gal Pressman, Vincent Guittot,
	linux-kernel, Tariq Toukan

Hi,

Implement and expose CPU spread API based on the scheduler's
sched_numa_find_closest().  Use it in mlx5 and enic device drivers.  This
replaces the binary NUMA preference (local / remote) with an improved one
that minds the actual distances, so that remote NUMAs with short distance
are preferred over farther ones.

This has significant performance implications when using NUMA-aware
memory allocations, improving the throughput and CPU utilization.

Regards,
Tariq

v4:
- memset to zero the cpus array in case !CONFIG_SMP.

v3:
- Introduce the logic as a common API instead of being mlx5 specific.
- Add implementation to enic device driver.
- Use non-atomic version of __cpumask_clear_cpu.

v2:
- Replace EXPORT_SYMBOL with EXPORT_SYMBOL_GPL, per Peter's comment.
- Separate the set_cpu operation into two functions, per Saeed's suggestion.
- Add Saeed's Acked-by signature.


Tariq Toukan (3):
  sched/topology: Add NUMA-based CPUs spread API
  net/mlx5e: Improve remote NUMA preferences used for the IRQ affinity
    hints
  enic: Use NUMA distances logic when setting affinity hints

 drivers/net/ethernet/cisco/enic/enic_main.c  | 10 +++-
 drivers/net/ethernet/mellanox/mlx5/core/eq.c |  5 +-
 include/linux/sched/topology.h               |  5 ++
 kernel/sched/topology.c                      | 49 ++++++++++++++++++++
 4 files changed, 65 insertions(+), 4 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2022-08-15 14:21 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-28 19:12 [PATCH net-next V4 0/3] Introduce and use NUMA distance metrics Tariq Toukan
2022-07-28 19:12 ` [PATCH net-next V4 1/3] sched/topology: Add NUMA-based CPUs spread API Tariq Toukan
2022-07-30 17:29   ` Tariq Toukan
2022-08-02  6:40     ` Tariq Toukan
2022-08-02  9:38       ` Valentin Schneider
2022-08-02 16:05         ` Jakub Kicinski
2022-08-04 17:28   ` Valentin Schneider
2022-08-08 14:39     ` Tariq Toukan
2022-08-09 10:02       ` Valentin Schneider
2022-08-09 10:18         ` Tariq Toukan
2022-08-09 12:52           ` Valentin Schneider
2022-08-09 14:04             ` Tariq Toukan
2022-08-09 17:36               ` Valentin Schneider
2022-08-10 10:46                 ` Valentin Schneider
2022-08-10 10:51                   ` [PATCH 1/2] sched/topology: Introduce sched_numa_hop_mask() Valentin Schneider
2022-08-10 10:51                     ` [PATCH 2/2] net/mlx5e: Leverage sched_numa_hop_mask() Valentin Schneider
2022-08-10 12:57                       ` Tariq Toukan
2022-08-10 17:42                         ` Jakub Kicinski
2022-08-11 14:26                         ` Valentin Schneider
2022-08-10 12:42                     ` [PATCH 1/2] sched/topology: Introduce sched_numa_hop_mask() Tariq Toukan
2022-08-10 12:57                       ` Tariq Toukan
2022-08-11 14:26                         ` Valentin Schneider
2022-08-14  8:19                           ` Tariq Toukan
2022-08-14  8:26                             ` Tariq Toukan
2022-08-15 14:20                             ` Valentin Schneider
2022-07-28 19:12 ` [PATCH net-next V4 2/3] net/mlx5e: Improve remote NUMA preferences used for the IRQ affinity hints Tariq Toukan
2022-07-28 19:12 ` [PATCH net-next V4 3/3] enic: Use NUMA distances logic when setting " Tariq Toukan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.