Timers and timing, was: MySQL Performance 6.0rc1

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Oct 28 03:50:19 PDT 2005


In message <436200BE.70604 at freebsd.org>, David Xu writes:
>Poul-Henning Kamp wrote:
>> In message <4361FDBE.7000500 at freebsd.org>, David Xu writes:
>> 
>> 
>> the correct way to optimize this would be to add a time(2) systemcall
>> which returns the value of the kernel global time_second.
>> 
>
>Can we make a page in kernel address space which is readable my user
>code? put the variable in the page, I know read an integer is atomic-op,
>needn't lock, so syscall is not needed.

We have often talked about doing something like that, but so far nobody
has come up with a (sensible) implementation.

Please thing _very_ carefully about the implications for libc
versioning before hacking up a patch.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at 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.


More information about the freebsd-current mailing list