diff options
author | mav <mav@FreeBSD.org> | 2010-09-14 08:48:06 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2010-09-14 08:48:06 +0000 |
commit | 6c05aa4db6d1ea20da8eca83a1214b74821b32d8 (patch) | |
tree | ad6e771c5b5091a633bf1f813ca1f742162ecb96 /sys/kern/kern_clock.c | |
parent | 5864d6e457c81a0a80b2ab3b57ee852e6f62efcb (diff) | |
download | FreeBSD-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_clock.c')
-rw-r--r-- | sys/kern/kern_clock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index 7fb70d0..192ec60 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -457,7 +457,7 @@ hardclock(int usermode, uintfptr_t pc) atomic_add_int((volatile int *)&ticks, 1); hardclock_cpu(usermode); - tc_ticktock(); + tc_ticktock(1); cpu_tick_calibration(); /* * If no separate statistics clock is available, run it from here. @@ -538,7 +538,7 @@ hardclock_anycpu(int cnt, int usermode) if (newticks > 0) { /* Dangerous and no need to call these things concurrently. */ if (atomic_cmpset_acq_int(&global_hardclock_run, 0, 1)) { - tc_ticktock(); + tc_ticktock(newticks); #ifdef DEVICE_POLLING /* This is very short and quick. */ hardclock_device_poll(); |