[ovs-git] [openvswitch/ovs] 42db85: ovs-numa: Add dump based thread affinity functions.

Ilya Maximets noreply at github.com
Fri Sep 6 10:31:30 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 42db85f3441e3cfb774b49f0ac87b41d43834f2b
      https://github.com/openvswitch/ovs/commit/42db85f3441e3cfb774b49f0ac87b41d43834f2b
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2019-09-06 (Fri, 06 Sep 2019)

  Changed paths:
    M lib/ovs-numa.c
    M lib/ovs-numa.h

  Log Message:
  -----------
  ovs-numa: Add dump based thread affinity functions.

New functions to get and set CPU affinity using CPU dumps.
This will abstract OS specific implementation details from the
cross-platform code.

Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>


  Commit: 1276e3db89bdb4db3dad21b1d03f982d0d186586
      https://github.com/openvswitch/ovs/commit/1276e3db89bdb4db3dad21b1d03f982d0d186586
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2019-09-06 (Fri, 06 Sep 2019)

  Changed paths:
    M lib/dpdk-stub.c
    M lib/dpdk.c
    M lib/dpdk.h
    M lib/dpif-netdev-perf.c
    M lib/dpif-netdev-perf.h
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev-perf: Fix TSC frequency for non-DPDK case.

Unlike 'rte_get_tsc_cycles()' which doesn't need any specific
initialization, 'rte_get_tsc_hz()' could be used only after successfull
call to 'rte_eal_init()'. 'rte_eal_init()' estimates the TSC frequency
for later use by 'rte_get_tsc_hz()'.  Fairly said, we're not allowed
to use 'rte_get_tsc_cycles()' before initializing DPDK too, but it
works this way for now and provides correct results.

This patch provides TSC frequency estimation code that will be used
in two cases:
  * DPDK is not compiled in, i.e. DPDK_NETDEV not defined.
  * DPDK compiled in but not initialized,
    i.e. other_config:dpdk-init=false

This change is mostly useful for AF_XDP netdev support, i.e. allows
to use dpif-netdev/pmd-perf-show command and various PMD perf metrics.

Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
Acked-by: William Tu <u9012063 at gmail.com>


  Commit: 15d8655b1f73b9b4be6b0ef1496b88f0543b8eda
      https://github.com/openvswitch/ovs/commit/15d8655b1f73b9b4be6b0ef1496b88f0543b8eda
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2019-09-06 (Fri, 06 Sep 2019)

  Changed paths:
    M lib/dpdk.c

  Log Message:
  -----------
  dpdk: Use ovs-numa provided functions to manage thread affinity.

This allows to decrease code duplication and avoid using Linux-specific
functions (this might be useful in the future if we'll try to allow
running OvS+DPDK on FreeBSD).

Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
Acked-by: William Tu <u9012063 at gmail.com>


  Commit: 8afbf2facca10b000ff3d5e8c92bcf727f0e7eb1
      https://github.com/openvswitch/ovs/commit/8afbf2facca10b000ff3d5e8c92bcf727f0e7eb1
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2019-09-06 (Fri, 06 Sep 2019)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Add core id in the PMD thread name.

This is highly useful to see on which core PMD is running by
only looking at the thread name. Thread Id still allows to
distinguish different threads running on the same core over the time:

   |dpif_netdev(pmd-c10/id:53)|DBG|Creating 2. subtable <...>
   |dpif_netdev(pmd-c10/id:53)|DBG|flow_add: <...>, actions:2
   |dpif_netdev(pmd-c09/id:70)|DBG|Core 9 processing port <..>

In gdb, top or any other utility it's useful to quickly catch up
needed thread without parsing logs, memory or matching threads by port
names they're handling.

Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
Acked-by: Eelco Chaudron <echaudro at redhat.com>


  Commit: 9b0064a3cad754e2ef20efe61054ea6ca8dbbbde
      https://github.com/openvswitch/ovs/commit/9b0064a3cad754e2ef20efe61054ea6ca8dbbbde
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2019-09-06 (Fri, 06 Sep 2019)

  Changed paths:
    M tests/automake.mk

  Log Message:
  -----------
  tests: Add track-origins flag to valgrind.

Useful for tracking where the uninitialized memory came from.
Report example:

  Thread 13 revalidator11:
  Conditional jump or move depends on uninitialised value(s)
     at 0x4C35D96: __memcmp_sse4_1 (in vgpreload_memcheck.so)
     by 0x9D4404: ofpbuf_equal (ofpbuf.h:273)
     by 0x9D4404: revalidate_ukey__ (ofproto-dpif-upcall.c:2219)
     <...>
     by 0x6AF488E: clone (clone.S:95)
   Uninitialised value was created by a stack allocation
     at 0x9D4450: compose_slow_path (ofproto-dpif-upcall.c:1062)

Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Tested-by: William Tu <u9012063 at gmail.com>
Acked-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/d11f4cbbfe05...9b0064a3cad7


More information about the git mailing list