--enable-time-hack

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Mon, 4 Sep 2000 11:26:33 +0200

 --enable-time-hack option is broken and mostly useless.

 It was suggested by me few years ago when I was suspecting
 that calls to gettimeofday() consumed alot of CPU on some
 platforms.
 At the time I was suggesting to place calls to getCurrentTime
 at specific places where current time is really needed, like
 ICP start/end, HTTP accept, HTTP start/end, DNS start/end.

 The patch currently in place is unfortunatley missing these
 strategic points and simply reduces amount of calls to
 getCurrentTime in comm_select.c. This seems to brake few things,
 and is especially noticed when using async-io, and maybe delay-pools.

 The patch itself consists of 2 parts, 1-sec heartbeat signal
 handler in main.c and patch to comm_select.c.

 I suggest to wipe out ALARM_UPDATES_TIME ifdefs from comm_select.c
 as they don't make any good, but leave heartbeat timer in place in
 main.c. Or at least split the 2 parts into distinct options.
 Alarm allows Squid internal time to be updated even in cases when
 any operation between two subsequent calls to getCurrentTime takes
 more than 1 sec time. And this happens at times. Basically, this
 timer allows for more correct times in cache.log.
 The sideeffect of timer is to interrupt some blocking calls to system
 with EINTR. Whether this could be used for good, or might cause
 trouble, I'm not sure.

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 Delfi Online
 Tel: 6501 731, Fax: 6501 708
 Pärnu mnt. 158, Tallinn,
 11317 Estonia
Received on Mon Sep 04 2000 - 03:29:29 MDT

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