tech-kern archive

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

Re: nanosleep accuracy



On Mar 26, 2014, at 6:03 PM, David Holland <dholland-tech%netbsd.org@localhost> 
wrote:

> http://www.dragonflybsd.org/presentations/nanosleep/
> 
> Can someone who's familiar with the timecounter code (that is, not me)
> look at this and see if we can steal their fixes?

The problem isn't timecounter, it's hardclock and the callout interface.
Ticks must die :)

callout_nschedule(callout *, u_long secs, u_long nsecs)

or just pass a uint64_t nsecs to callout_schedule.

Then the callout code can call a md routine with the amount of time
until the next callout is scheduled.  

of course hardclock would need to invoked with a second argument to
indicate how much time passed.  This would affect profiling accuracy
but increase battery life.


Home | Main Index | Thread Index | Old Index