svn commit: r244148 - projects/calloutng/sys/kern
Davide Italiano
davide at FreeBSD.org
Wed Dec 12 12:14:06 UTC 2012
Author: davide
Date: Wed Dec 12 12:14:05 2012
New Revision: 244148
URL: http://svnweb.freebsd.org/changeset/base/244148
Log:
FREQ2BT is an heavy 64-bit division. There's no need to compute that
everytime we enter in callout_reset_on(), in particular if the input is
a costant and precalculated value.
Modified:
projects/calloutng/sys/kern/kern_timeout.c
Modified: projects/calloutng/sys/kern/kern_timeout.c
==============================================================================
--- projects/calloutng/sys/kern/kern_timeout.c Wed Dec 12 12:02:58 2012 (r244147)
+++ projects/calloutng/sys/kern/kern_timeout.c Wed Dec 12 12:14:05 2012 (r244148)
@@ -933,8 +933,7 @@ _callout_reset_on(struct callout *c, str
cancelled = 0;
if (bt == NULL) {
- FREQ2BT(hz, &to_bt);
- pr = to_bt;
+ pr = to_bt = tick_bt;
getbinuptime(&now);
if (to_ticks > 0)
bintime_mul(&to_bt, to_ticks);
More information about the svn-src-projects
mailing list