vswitchd: Avoid 100% CPU when secchan dies too many times.
authorBen Pfaff <blp@nicira.com>
Fri, 6 Feb 2009 23:07:38 +0000 (15:07 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 6 Feb 2009 23:07:50 +0000 (15:07 -0800)
commit1bd75a539b725e57dbec8309ccd4febebe1face9
tree8f22685b9cb9e5dcd255ffe9528c9e0969fce810
parent399ebef23f38d1fc6a1c65b21f15b2999c9663fc
vswitchd: Avoid 100% CPU when secchan dies too many times.

vswitchd restarts secchan when necessary, but it limits the maximum number
of tries to avoid wasting CPU when secchan repeatedly dies.  Unfortunately,
when this happens it also throws vswitchd into a busy-wait by calling
process_wait() on the dead secchan process, because it doesn't clear out
the process from the bridge structure.

This commit clears out the secchan process from the bridge structure, so
that we don't attempt to wait on it any longer, and should fix the busy-wait
problem.
vswitchd/bridge.c