Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Global page into user processes (was: Re: Patch to cache TLS in %fp7 to avoid _lwp_getprivate syscalls)



On Wed, Jan 18, 2012 at 04:56:50PM -0500, Matthew Mondor wrote:
> On Wed, 18 Jan 2012 22:43:18 +0100
> Joerg Sonnenberger <joerg%britannica.bec.de@localhost> wrote:
> 
> > On Wed, Jan 18, 2012 at 03:20:57PM -0500, Matthew Mondor wrote:
> > > I noticed that the KERN_HARDCLOCK_TICKS sysctl(3) is still quite faster
> > > than gettimeofday(2) (although it only exports a single int, the
> > > hardclock(9)):
> > 
> > Well, what timer are you using? Unless it is TSC or LAPIC, it is going
> > to take significantly longer than the system call overhead or just
> > reading a global variable.
> 
> This was with TSC.  But the KERN_HARDCLOCK_TICKS sysctl knob appears
> to export the hardclock_ticks global variable (at least on netbsd-5).

Yes, which is ~free. It would be an option to add CLOCK_MONOTONIC_FAST
or so with the express desire to not provide a resolution larger than
1/HZ.

Joerg


Home | Main Index | Thread Index | Old Index