Re: kernel 2.6 speed

From: Willy Tarreau
Date: Mon Jul 25 2005 - 00:32:05 EST

On Mon, Jul 25, 2005 at 12:10:15AM -0400, Florin Malita wrote:
> On 7/24/05, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> 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.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at