Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Oct 2005 12:34:48 +0200
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        David Xu <davidxu@freebsd.org>
Cc:        Pertti Kosunen <pertti.kosunen@pp.nic.fi>, current@freebsd.org, "Yuriy N. Shkandybin" <jura@networks.ru>
Subject:   Re: Timers and timing, was: MySQL Performance 6.0rc1 
Message-ID:  <31129.1130495688@critter.freebsd.dk>
In-Reply-To: Your message of "Fri, 28 Oct 2005 18:30:22 %2B0800." <4361FDBE.7000500@freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <4361FDBE.7000500@freebsd.org>, David Xu writes:

>Now, I can confirm mysqld calls time() function lots of time, I have
>changed time() to call clock_gettime, now there is few of gettimeofday 
>in ktrace result, but fully filled by clock_gettime.

the correct way to optimize this would be to add a time(2) systemcall
which returns the value of the kernel global time_second.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?31129.1130495688>