--enable-time-hack

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Fri, 17 Nov 2000 13:19:23 +0200

 I suggest to make --enable-time-hack a default, but disable it
 completely in comm_select.c, or at least move it off the way.
 Using it in comm_select brakes async stuff, causing high spikes
 of CPU usage at random times.
 Still, updating squid time with signal handler can be useful, as
 there may occur situations when some func takes several secs to
 complete.
 Below I simply move it off the way to resolve a conflict with async.

Index: comm_select.c
===================================================================
RCS file: /cvsroot/squid/squid/src/comm_select.c,v
retrieving revision 1.3
diff -u -r1.3 comm_select.c
--- comm_select.c 2000/10/23 15:04:20 1.3
+++ comm_select.c 2000/11/17 11:05:02
@@ -220,7 +220,7 @@
     }
     if (!nfds)
         return -1;
-#if !ALARM_UPDATES_TIME
+#if !ALARM_UPDATES_TIME_HACK
     getCurrentTime();
 #endif
     statCounter.syscalls.polls++;
@@ -321,7 +321,7 @@
     static time_t last_timeout = 0;
     double timeout = current_dtime + (msec / 1000.0);
     do {
-#if !ALARM_UPDATES_TIME
+#if !ALARM_UPDATES_TIME_HACK
         double start;
         getCurrentTime();
         start = current_dtime;
@@ -501,7 +501,7 @@
             }
         }
 #endif
-#if !ALARM_UPDATES_TIME
+#if !ALARM_UPDATES_TIME_HACK
         getCurrentTime();
         statCounter.select_time += (current_dtime - start);
 #endif
@@ -541,7 +541,7 @@
     }
     if (maxfd++ == 0)
         return -1;
-#if !ALARM_UPDATES_TIME
+#if !ALARM_UPDATES_TIME_HACK
     getCurrentTime();
 #endif
     statCounter.syscalls.selects++;
@@ -653,7 +653,7 @@
     double timeout = current_dtime + (msec / 1000.0);
     fde *F;
     do {
-#if !ALARM_UPDATES_TIME
+#if !ALARM_UPDATES_TIME_HACK
         getCurrentTime();
 #endif
 #if DELAY_POOLS

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 Delfi Online
 Tel: 6501 731, Fax: 6501 708
 Pärnu mnt. 158, Tallinn,
 11317 Estonia
Received on Fri Nov 17 2000 - 04:22:28 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:59 MST