[ovs-git] Open vSwitch: ofproto: Add "fast path". (master)

dev at openvswitch.org dev at openvswitch.org
Mon Nov 28 18:42:30 UTC 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  5fcc0d004ae0aa080deed51c842d074a83ec1f67 (commit)
       via  9b16c4394b940573d733c47fa7213bbe99a456d9 (commit)
       via  50f80534f2bcf5bbe58f94cfc2a8a16236b4bf56 (commit)
       via  8522ba0996907af86eb63afd4c69e9fd6bb1178a (commit)
       via  3907401ce6c5a848797507fcd6bc97218d4847e2 (commit)
       via  f6d1465cec98fd7e83845d24fb394145bbbcf531 (commit)
      from  c06bba01302e3dc1ec7808024bc37ce90956b49e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5fcc0d004ae0aa080deed51c842d074a83ec1f67
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=5fcc0d004ae0aa080deed51c842d074a83ec1f67
Author: Ben Pfaff <blp at nicira.com>
		
ofproto: Add "fast path".
		
The key to getting good performance on the netperf CRR test seems to be to
handle the first packet of each new flow as quickly as possible.  Until
now, we've only had one opportunity to do that on each trip through the
main poll loop.  One way to improve would be to make that poll loop
circulate more quickly.  My experiments show, however, that even just
commenting out the slower parts of the poll loop yield minimal improvement.

This commit takes another approach.  Instead of making the poll loop
overall faster, it invokes the performance-critical parts of it more than
once during each poll loop.

My measurements show that this commit improves netperf CRR performance by
24% versus the previous commit, for an overall improvement of 87% versus
the baseline just before the commit that removed the poll_fd_woke().  With
this commit, ovs-benchmark performance has also improved by 13% overall
since that baseline.


commit 9b16c4394b940573d733c47fa7213bbe99a456d9
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=9b16c4394b940573d733c47fa7213bbe99a456d9
Author: Ben Pfaff <blp at nicira.com>
		
ofproto-dpif: Process multiple batches of upcalls in a single poll loop.
		
This yields a 27% improvement in netperf CRR results in my tests
versus the previous commit, which is a 52% improvement versus
the baseline from just before the poll_fd_woke() optimization was
removed.


commit 50f80534f2bcf5bbe58f94cfc2a8a16236b4bf56
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=50f80534f2bcf5bbe58f94cfc2a8a16236b4bf56
Author: Ben Pfaff <blp at nicira.com>
		
dpif-linux: Use "epoll" instead of poll().
		
epoll appears to be much more efficient than poll() at least for
static file descriptor sets.  I can't otherwise explain why this
patch increases netperf CRR performance by 20% above the previous
commit, which is also about a 19% overall improvement versus
the baseline from before the poll_fd_woke() optimization was
removed.


commit 8522ba0996907af86eb63afd4c69e9fd6bb1178a
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=8522ba0996907af86eb63afd4c69e9fd6bb1178a
Author: Ben Pfaff <blp at nicira.com>
		
dpif-linux: Use poll() internally in dpif_linux_recv().
		
Using poll() internally in dpif_linux_recv(), instead of relying
on the results of the main loop poll() call, brings netperf CRR
performance back within 1% of par versus the code base before the
poll_fd_woke() optimizations were introduced.  It also increases
the ovs-benchmark results by about 5% versus that baseline, too.

My theory is that this is because the main loop takes long enough
that a significant number of packets can arrive during the main
loop itself, so this reduces the time before OVS gets to those
packets.


commit 3907401ce6c5a848797507fcd6bc97218d4847e2
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=3907401ce6c5a848797507fcd6bc97218d4847e2
Author: Ben Pfaff <blp at nicira.com>
		
Revert "poll-loop: Enable checking whether a FD caused a wakeup."
		
This reverts commit 1e276d1a10539a8cd97d2ad63c073a9a43f0f1ef.
The poll_fd_woke() and nl_sock_woke() function added in that commit are
no longer used, so there is no reason to keep them in the tree.


commit f6d1465cec98fd7e83845d24fb394145bbbcf531
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=f6d1465cec98fd7e83845d24fb394145bbbcf531
Author: Ben Pfaff <blp at nicira.com>
		
dpif-linux: Remove poll_fd_woke() optimization from dpif_linux_recv().
		
This optimization on its own provided about 37% benefit against a
load of a single netperf CRR test, but at the same time it penalized
ovs-benchmark by about 11%.  We can get back the CRR performance
loss, and more, other ways, so the first step is to revert this
patch, temporarily accepting the performance loss.


-----------------------------------------------------------------------

Summary of changes:
 lib/dpif-linux.c           |  111 +++++++++++++++++++++++++++++--------------
 lib/dpif.c                 |    2 +
 lib/netlink-socket.c       |   15 ++++--
 lib/netlink-socket.h       |    2 +-
 lib/poll-loop.c            |   33 ++-----------
 lib/poll-loop.h            |    3 -
 ofproto/ofproto-dpif.c     |  109 +++++++++++++++++++++++++++----------------
 ofproto/ofproto-provider.h |   13 ++++--
 ofproto/ofproto.c          |   31 +++++++++----
 ofproto/ofproto.h          |    1 +
 vswitchd/bridge.c          |   28 +++++++----
 vswitchd/bridge.h          |    3 +-
 vswitchd/ovs-vswitchd.c    |    2 +
 13 files changed, 214 insertions(+), 139 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list