[ovs-dev] [PATCH] timeval: Block SIGALRM when sleeping.

Ethan Jackson ethan at nicira.com
Tue Oct 16 00:14:31 UTC 2012


Commit 00a16895 (timeval: Don't require signals for time_alarm().)
Incorrectly disabled signals when when CACHE_TIME was disabled.  In
fact, the reverse was correct.  As a result of this bug, OVS would
wake once every 100ms unnecessarily.  It shouldn't have affected
correctness otherwise.

Signed-off-by: Ethan Jackson <ethan at nicira.com>
---
 lib/timeval.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/timeval.c b/lib/timeval.c
index ea05017..302224a 100644
--- a/lib/timeval.c
+++ b/lib/timeval.c
@@ -375,7 +375,7 @@ time_poll(struct pollfd *pollfds, int n_pollfds, long long int timeout_when,
             break;
         }
 
-        if (!blocked && !CACHE_TIME) {
+        if (!blocked && CACHE_TIME && !backtrace_conn) {
             block_sigalrm(&oldsigs);
             blocked = true;
         }
-- 
1.7.12




More information about the dev mailing list