diff options
author | Alexander Motin <mav@FreeBSD.org> | 2010-09-14 08:48:06 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2010-09-14 08:48:06 +0000 |
commit | 0e18987383f8efc7624b61731c42c565293be9d8 (patch) | |
tree | ad6e771c5b5091a633bf1f813ca1f742162ecb96 /sys/kern/kern_timeout.c | |
parent | 4763a8b8c1e4d7e7c8b4511dbed83bb19e143468 (diff) | |
download | src-0e18987383f8efc7624b61731c42c565293be9d8.tar.gz src-0e18987383f8efc7624b61731c42c565293be9d8.zip |
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).
Notes
Notes:
svn path=/head/; revision=212603
Diffstat (limited to 'sys/kern/kern_timeout.c')
-rw-r--r-- | sys/kern/kern_timeout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index 569779235481..89fe544894d4 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 ){ |