Currently, we have a single thread (the 'flow_dumper') that fetches the flows
from the datapath and distributes them to revalidator threads. To clean up the
code and support more flows in the datapath, we are looking at removing this
flow_dumper thread, and have each revalidator fetch flows from the datapath
instead.

This patchset implements the functionality:
* Patches 1-5 modify the datapath interface to allow multiple threads to dump
  flows concurrently. These are the same patches as "Flow dump threadsafety"
  v2, rebased against master.
* Patches 6 and 7 remove the flow dumper.

Behaviour
---------

In most cases, this patchset allows vswitchd to maintain a higher number of
flows in the datapath. There is a notable increase in the number of ukeys
created and stored (not strictly good or bad, just an observation). In
testing with netperf TCP_CRR, the performance generally has parity with
master, although particular thread configurations display a negative impact
on this metric. I would consider this a direct trade-off between the increase
in the number of flows in the datapath and the ability to install new flows.

Regardless, the performance is still higher than when we maintained facets,
and this patchset simplifies the code. There is plenty of room for optimising
related code, and adjusting the criteria for flow installation/removal to
benefitparticular performance scenarios. As such, I'd like to work towards
merging this code, andwe can continue to optimise as we go.

Availability
------------

This patch set is also available as a branch on my github:

git://github.com/joestringer/openvswitch.git submit/threaded_flow_dump_v4


Ethan Jackson (1):
  ofproto-dpif: Remove the flow_dumper thread.

Joe Stringer (6):
  netlink: Remove buffer from 'struct nl_dump'.
  netlink: Make nl_dump_next() thread-safe.
  dpif: Separate local and shared flow dump state.
  dpif: Make dpif_flow_dump_next() thread-safe.
  dpif: Don't synchronize flow_dump_next() status.
  dpif: New function flow_dump_next_may_destroy_keys().

 lib/dpif-linux.c              |  102 ++++++--
 lib/dpif-netdev.c             |   78 ++++--
 lib/dpif-provider.h           |   61 +++--
 lib/dpif.c                    |  121 +++++----
 lib/dpif.h                    |   29 ++-
 lib/netdev-linux.c            |   42 ++--
 lib/netlink-socket.c          |  148 ++++++-----
 lib/netlink-socket.h          |   21 +-
 lib/route-table.c             |   14 +-
 ofproto/ofproto-dpif-upcall.c |  539 ++++++++++++++++++-----------------------
 ofproto/ofproto-dpif.c        |   18 +-
 utilities/ovs-dpctl.c         |   31 ++-
 12 files changed, 687 insertions(+), 517 deletions(-)

--
1.7.9.5
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to