[ovs-git] [openvswitch/ovs] 105cf8: netdev-linux: Detect numa node id.

Yi-Hung Wei noreply at github.com
Sat Jan 18 01:22:21 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 105cf8df82f75d38b3afe1d7e1a4fe421f767ca2
      https://github.com/openvswitch/ovs/commit/105cf8df82f75d38b3afe1d7e1a4fe421f767ca2
  Author: William Tu <u9012063 at gmail.com>
  Date:   2020-01-18 (Sat, 18 Jan 2020)

  Changed paths:
    M Documentation/intro/install/afxdp.rst
    M lib/netdev-afxdp.c
    M lib/netdev-afxdp.h
    M lib/netdev-linux-private.h
    M lib/netdev-linux.c

  Log Message:
  -----------
  netdev-linux: Detect numa node id.

The patch detects the numa node id from the name of the netdev,
by reading the '/sys/class/net/<devname>/device/numa_node'.
If not available, ex: virtual device, or any error happens,
return numa id 0.  Currently only the afxdp netdev type uses it,
other linux netdev types are disabled due to no use case.

Signed-off-by: William Tu <u9012063 at gmail.com>
Acked-by: Eelco Chaudron <echaudro at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: e8568993e062afcb75a7a54b1a615f04d7d6df37
      https://github.com/openvswitch/ovs/commit/e8568993e062afcb75a7a54b1a615f04d7d6df37
  Author: Yi-Hung Wei <yihung.wei at gmail.com>
  Date:   2020-01-18 (Sat, 18 Jan 2020)

  Changed paths:
    M Documentation/intro/install/afxdp.rst
    M acinclude.m4
    M include/sparse/automake.mk
    A include/sparse/numa.h
    M lib/netdev-afxdp.c

  Log Message:
  -----------
  netdev-afxdp: NUMA-aware memory allocation for XSK related memory.

Currently, the AF_XDP socket (XSK) related memory are allocated by main
thread in the main thread's NUMA domain.  With the patch that detects
netdev-linux's NUMA node id, the PMD thread of AF_XDP port will be run on
the AF_XDP netdev's NUMA domain.  If the net device's NUMA domain
is different from the main thread's NUMA domain, we will have two
cross-NUMA memory accesses (netdev <-> memory, memory <-> CPU).

This patch addresses the aforementioned issue by allocating
the memory in the net device's NUMA domain.

Signed-off-by: Yi-Hung Wei <yihung.wei at gmail.com>
Acked-by: William Tu <u9012063 at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/29cf9c1b3b9c...e8568993e062


More information about the git mailing list