[ovs-git] Open vSwitch: Make sure that time advances in a daemon between calls to time_refresh(). (citrix)

dev at openvswitch.org dev at openvswitch.org
Thu Oct 15 17:44:10 UTC 2009


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, citrix has been updated
       via  03fbffbda4d36188944a4df39eace449a0c306dd (commit)
      from  43a6c464efaf271411c8e2d19357e11bf6ff5afa (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 03fbffbda4d36188944a4df39eace449a0c306dd
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=03fbffbda4d36188944a4df39eace449a0c306dd
Author: Ben Pfaff <blp at nicira.com>
		
Make sure that time advances in a daemon between calls to time_refresh().
		
Open vSwitch uses an interval timer signal to tell it that its cached idea
of the current time has expired.  However, this didn't work in a daemon
detached from the foreground session (invoked with --detach) because a
child created with fork() does not inherit the parent's interval timer and
we did not re-set it after calling fork().

This commit fixes the problem by setting the interval timer back up after
calling fork() from daemonize().

This fix is based on code inspection (which was then verified to be correct
through testing).  It may not fix any actual problems in practice, because
time_refresh() is called every time through the poll loop, and the poll
loop typically runs more quickly than the periodic timer fires (1 ms or so
average in ovs-vswitchd, vs. 100 ms timer interval).


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

Summary of changes:
 lib/daemon.c  |    2 ++
 lib/timeval.c |   24 +++++++++++++++++++++---
 lib/timeval.h |    1 +
 3 files changed, 24 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Open vSwitch




More information about the git mailing list