summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_timeout.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2010-09-14 08:48:06 +0000
committermav <mav@FreeBSD.org>2010-09-14 08:48:06 +0000
commit6c05aa4db6d1ea20da8eca83a1214b74821b32d8 (patch)
treead6e771c5b5091a633bf1f813ca1f742162ecb96 /sys/kern/kern_timeout.c
parent5864d6e457c81a0a80b2ab3b57ee852e6f62efcb (diff)
downloadFreeBSD-src-6c05aa4db6d1ea20da8eca83a1214b74821b32d8.zip
FreeBSD-src-6c05aa4db6d1ea20da8eca83a1214b74821b32d8.tar.gz
Make kern_tc.c provide minimum frequency of tc_ticktock() calls, required
to handle current timecounter wraps. Make kern_clocksource.c to honor that requirement, scheduling sleeps on first CPU for no more then specified period. Allow other CPUs to sleep up to 1/4 second (for any case).
Diffstat (limited to 'sys/kern/kern_timeout.c')
-rw-r--r--sys/kern/kern_timeout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index 5697792..89fe544 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -280,7 +280,7 @@ callout_tick(void)
}
int
-callout_tickstofirst(void)
+callout_tickstofirst(int limit)
{
struct callout_cpu *cc;
struct callout *c;
@@ -291,7 +291,7 @@ callout_tickstofirst(void)
cc = CC_SELF();
mtx_lock_spin_flags(&cc->cc_lock, MTX_QUIET);
curticks = cc->cc_ticks;
- while( skip < ncallout && skip < hz/8 ) {
+ while( skip < ncallout && skip < limit ) {
sc = &cc->cc_callwheel[ (curticks+skip) & callwheelmask ];
/* search scanning ticks */
TAILQ_FOREACH( c, sc, c_links.tqe ){
OpenPOWER on IntegriCloud