bridge: Wait for previous stats update transation when it is incomplete.
authorAlex Wang <alexw@nicira.com>
Wed, 1 Apr 2015 00:07:03 +0000 (17:07 -0700)
committerAlex Wang <alexw@nicira.com>
Mon, 6 Apr 2015 21:26:56 +0000 (14:26 -0700)
commit131d04dcc4190d4202d605bd982047084e987fba
treed7e30ca1f3457ff26fdeb7866ecd5bdb7a7e47e0
parent500ce35e8d2ef05295dd9e3b6147cd55dd79df55
bridge: Wait for previous stats update transation when it is incomplete.

When ovsdb happens to get blocked for few seconds, the 'stats_timer'
will not be updated due to incompletion of previous transaction.
When the current time passes the 'stats_timer', the call to
poll_timer_wait_until(stats_timer) will keep waking up ovs-vswitchd,
causing 100% cpu utilization.

This commit fixes this issue by making ovs-vswitchd wait on the
previous idl transaction when it is incomplete rather than the
'stats_timer'.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
vswitchd/bridge.c