summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2007-06-03 22:14:08 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2007-06-03 22:14:08 +0000
commitebb09f23989a134bf1f8a66de179652c0dbdd51a (patch)
treefe652b671f941ed7ee477873938a0ddf6dbd12d0
parent9d47645f4c474841114661ae2bfe34ab446ae3f7 (diff)
the kernel starts with setperf=100, even though the bios may have throttled.
this confuses apmd, so when using auto adjust modes, first cycle through 0 and 100 to make sure we're in a known state. ok deraadt
-rw-r--r--usr.sbin/apmd/apmd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c
index 45f1cb5ef1a..a96d7a9f155 100644
--- a/usr.sbin/apmd/apmd.c
+++ b/usr.sbin/apmd/apmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apmd.c,v 1.46 2007/04/28 06:42:43 sturm Exp $ */
+/* $OpenBSD: apmd.c,v 1.47 2007/06/03 22:14:07 tedu Exp $ */
/*
* Copyright (c) 1995, 1996 John T. Kohl
@@ -632,6 +632,10 @@ main(int argc, char *argv[])
if (sysctl(ncpu_mib, 2, &ncpu, &ncpu_sz, NULL, 0) < 0)
error("cannot read hw.ncpu", NULL);
+ if (doperf == PERF_AUTO || doperf == PERF_COOL) {
+ setperf(0);
+ setperf(100);
+ }
for (;;) {
int rv;