ofproto: Add "fast path".
authorBen Pfaff <blp@nicira.com>
Mon, 28 Nov 2011 18:35:15 +0000 (10:35 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 29 Nov 2011 00:56:30 +0000 (16:56 -0800)
commitfe3311642fbebd53608523574cecd45f893c1911
treed59f93e8eb93fbd6148c2d8f82e69fed6769f135
parent06aafa84d5a6556340cdf10145e6d25cbc3b3f2d
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.
lib/dpif.c
ofproto/ofproto-dpif.c
ofproto/ofproto-provider.h
ofproto/ofproto.c
ofproto/ofproto.h
vswitchd/bridge.c
vswitchd/bridge.h
vswitchd/ovs-vswitchd.c