tickless design guidelines

Alexander Motin mav at FreeBSD.org
Tue Mar 5 09:22:02 UTC 2013


On 05.03.2013 11:07, Luigi Rizzo wrote:
> Also i wonder if it may make sense to add a feature so that whenever
> we get an interrupt and a fast and suitable timecounter is available,
> some system-wide bintime is updated.
> 
> So getbinuptime() could just use this counter, becoming extremely
> cheap (perhaps it is already, i am not sure) and in the long term,
> as CPUs with fixed frequency TSC become ubiquitous,
> we would get higher resolution as the interrupt load increases.

Each time timer interrupt fires, or CPU timers "switched" between idle
and active modes present time is fetched. The only question is how to
store it somewhere safely. It was difficult for 96/128-bit struct
bintime. It is easier for 64-bit sbintime_t, but still not all archs are
able to do it atomically. The mechanism used for getbinuptime() now may
not scale well to the very high update rates.

-- 
Alexander Motin


More information about the freebsd-arch mailing list