SoC 2009: Redesign the callout API

Prashant Vaibhav pvaibhav at freebsd.org
Sun Apr 26 18:13:45 UTC 2009


Hello,
I am Prashant Vaibhav, a 22 year old Indian guy (undergrad from Germany) and
I'm a Google Summer of Code participant for 2009. My work will be focused on
improving the callout/timeout API in the kernel. It was inspired by the
tickless kernel feature present in XNU and Linux (since recent releases),
and discussions made on the mailing lists a few years back about problems
with the current implementation.

Basically, the callout API will be redesigned to use opaque 'ticks' instead
of explicitly x/HZ, and provide for certain additional features (like
specifying a time range while arming). Beneath the hood, the implementation
will be completely redesigned to use more efficient method of storing the
callout list, and using any available timer in a hardware-independent way.
It will then be extended to support deadline mode on capable systems (ie.
dynamic HZ). This means for machines having an HPET or similar
deadline-capable timer with a long range, the kernel will be completely
tickless. On other machines with only a PIT, the 'ticks' could be as
infrequent as a few times a second to once every 2 seconds, instead of 100
Hz.

The major advantages are that the usage of hardware-dependent ticks and
abstracting out timer hardware will make higher-resolution callouts
possible, and in turn, making the kernel tickless will allow for better
power savings, more efficient usage of CPU clock cycles, and better
performance in virtual machines.

More details can be found at the wiki page:
http://wiki.freebsd.org/SOC2009PrashantVaibhav

Best regards,
Prashant Vaibhav


More information about the freebsd-hackers mailing list