[ovs-git] [openvswitch/ovs] ba8ec1: bridge: Fix bug where IDL wakeup causes 100% CPU.
noreply at github.com
Mon Sep 29 18:53:33 UTC 2014
Author: Joe Stringer <joestringer at nicira.com>
Date: 2014-09-30 (Tue, 30 Sep 2014)
bridge: Fix bug where IDL wakeup causes 100% CPU.
Commit 9c537baf613a16e (bridge: Refactor the stats and status update.)
inadvertently changed the way that the status transaction is destroyed,
which could cause the main thread to constantly wake up.
The bug occurs when ovsdb_idl_txn_commit() returns TXN_INCOMPLETE and
there are no further changes to connectivity or 'status_txn_try_again'.
- ovsdb_idl_run() receives the transaction reply and updates the
transaction status to TXN_SUCCESS.
- status_update_wait() detects that the transaction is in progress, and
the status is TXN_SUCCESS so wakes up the main thread immediately.
- run_status_update() is meant to destroy the transaction now that it is
finished, however the logic is never run because there were no changes.
- Repeat the wakeup every time the main loop runs.
This patch fixes the behaviour by ensuring that ovsdb_idl_txn_commit()
gets a chance to run whenever there is an ongoing status transaction.
Bug was found by unloading and reloading the kernel module, then
immediately restarting ovs-vswitchd.
Signed-off-by: Joe Stringer <joestringer at nicira.com>
Acked-by: Alex Wang <alexw at nicira.com>
More information about the git