[RFC/RFT] callout(9): major changes

Davide Italiano davide.italiano at gmail.com
Sun Jul 1 16:32:38 UTC 2012


On Sun, Jul 1, 2012 at 3:32 PM, Davide Italiano <davide at freebsd.org> wrote:
> Howdy.
> As part of the Google Summer of Code project, in the last weeks, I
> worked on some changes in the callout(9) subsystem, under the
> mentorship of Alexander Motin (mav@).
> The projects aims to adapt the callout() backend in order to exploit
> better precision allowed by the recently introducted eventtimers(4/9)
> subsystem.
> A patch may be found here: http://people.freebsd.org/~davide/callout_patch.diff
> If you want to try  the code may be found in FreeBSD svn projects/
> repository: http://svnweb.freebsd.org/base/projects/calloutng/
> At the time of writing, the code cannot be considered ready for hit
> the tree, some work is still missing, but some goals have been
> reached. In particular:
>
> - The callout(9) backend  was completely switched from a tick-based
> approach to a tickless one.
> - The code has been integrated with the eventtimers
> - An experimental new KPI has been introduced so that timeouts for
> callout_* may be specified also in terms of bintime other than ticks,
> as previously allowed
> - Support for execution of callouts from hw interrupt context has been
> introduced
> - In order to prove effectiveness of the approach, some consumers (in
> particular sleep/pool/select) have been ported to the new KPI, and the
> changes have been microbenchmarked
> - Some experiments of event aggregation have been done, as well as the
> definition of  new KPI in which consumers may specify granularity at
> which events may be aggregated.
>
> For my benchmarks I used the same program luigi@ has recently used,
> even though results are a bit different
> (http://lists.freebsd.org/pipermail/freebsd-arch/2012-February/012413.html).
> Just a bit of results:
> Sequential usleep():
> This graph shows on the x-axes the timeout se and on y-axes the real
> sleep time (in the range [1;1000]). Timeout is increased sequentially
> by one unit every iteration. Green line represents the "ideal" case,
> Red line represents results after the changes made.
> http://people.freebsd.org/~davide/sequential_new.png
> Random sleep():
> same as before, but in this case I plotted the delta among the
> expected sleep time and the actual sleep time.
> http://people.freebsd.org/~davide/delta_random.png
> Random select():
> http://people.freebsd.org/~davide/delta_random.png

Sorry, this is the correct link for random select() results:
http://people.freebsd.org/~davide/random_new.png

>
> I'd like to have some feedback/comments on the implementative choices
> I've done, as well as on the new defined KPI or future directions.
> If you've any question, feel free to ask.
>
> Davide

Davide


More information about the freebsd-arch mailing list