summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2006-02-11 09:33:07 +0000
committerphk <phk@FreeBSD.org>2006-02-11 09:33:07 +0000
commit79081baaf0634d209ef24667ca3e00c0ad2abd5a (patch)
tree73ea17d2f55a44a7f1176452216547b95457bc95 /sys/sparc64
parente106ce1e069b73603da4b3fbb78ab08cc3ee352c (diff)
downloadFreeBSD-src-79081baaf0634d209ef24667ca3e00c0ad2abd5a.zip
FreeBSD-src-79081baaf0634d209ef24667ca3e00c0ad2abd5a.tar.gz
CPU time accounting speedup (step 2)
Keep accounting time (in per-cpu) cputicks and the statistics counts in the thread and summarize into struct proc when at context switch. Don't reach across CPUs in calcru(). Add code to calibrate the top speed of cpu_tickrate() for variable cpu_tick hardware (like TSC on power managed machines). Don't enforce monotonicity (at least for now) in calcru. While the calibrated cpu_tickrate ramps up it may not be true. Use 27MHz counter on i386/Geode. Use TSC on amd64 & i386 if present. Use tick counter on sparc64
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/tick.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/sparc64/sparc64/tick.c b/sys/sparc64/sparc64/tick.c
index 6f9f1a8..61f3bae 100644
--- a/sys/sparc64/sparc64/tick.c
+++ b/sys/sparc64/sparc64/tick.c
@@ -72,13 +72,6 @@ tick_cputicks(void)
return (rd(tick));
}
-static uint64_t
-tick_cputickrate(void)
-{
-
- return (tick_freq);
-}
-
void
cpu_initclocks(void)
{
@@ -171,8 +164,7 @@ tick_init(u_long clock)
*/
tick_stop();
- cpu_ticks = tick_cputicks;
- cpu_tickrate = tick_cputickrate;
+ set_cputicker(tick_cputicks, tick_freq, 0);
}
void
OpenPOWER on IntegriCloud