Date: Fri, 28 Oct 2005 14:08:01 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: David Xu <davidxu@freebsd.org> Cc: Pertti Kosunen <pertti.kosunen@pp.nic.fi>, Poul-Henning Kamp <phk@phk.freebsd.dk>, current@freebsd.org, "Yuriy N. Shkandybin" <jura@networks.ru> Subject: Re: Timers and timing, was: MySQL Performance 6.0rc1 Message-ID: <20051028140556.W20147@fledge.watson.org> In-Reply-To: <436200BE.70604@freebsd.org> References: <31129.1130495688@critter.freebsd.dk> <436200BE.70604@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 28 Oct 2005, David Xu wrote: > Poul-Henning Kamp wrote: >> In message <4361FDBE.7000500@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. This approach has a lot of merit, as we can also potentially export other information there (such as kernel preferences for system call mechanisms). On the other hand, a lower risk change might be to simply add a new CLOCK_ type for lower resolution, and have a timer synchronize a variable to the system clock once every 1/10 of a second. This avoids having to muck with VM layout, etc. Robert N M Watson
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051028140556.W20147>