Messages in this thread | | | Date | Mon, 25 Jul 2005 07:18:48 +0200 | From | Willy Tarreau <> | Subject | Re: kernel 2.6 speed |
| |
On Mon, Jul 25, 2005 at 12:10:15AM -0400, Florin Malita wrote: > On 7/24/05, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote: > > time() isn't a hot > > path in the real world. > > That's what you would expect but I've straced stuff calling > gettimeofday() in huge bursts every other second. Obviously braindead > stuff but so is "the real world" most of the time() ... :)
gettimeofday() is known to be called very often (after any select() or poll() returns), and is optimized for such conditions. There was even an implementation, which I don't know if it finally became mainstream, which optimized this particular system call. Some networking applications might call it tens of thousands of times per second.
But as Alan said, time() (not to be confused with gettimeofday()) is not a hot path.
Willy
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |