Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/i386 Stupid hack: run the apm kthread at 8*hz/...



details:   https://anonhg.NetBSD.org/src/rev/cb4ee1bc9b13
branches:  trunk
changeset: 483662:cb4ee1bc9b13
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Wed Mar 15 09:30:11 2000 +0000

description:
Stupid hack: run the apm kthread at 8*hz/7 intervals, not hz. Prevents
the load average from being 1.0 or higher constantly.

XXX really need a better way of calculating the load average.

diffstat:

 sys/arch/i386/i386/apm.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r c540dca3a06f -r cb4ee1bc9b13 sys/arch/i386/i386/apm.c
--- a/sys/arch/i386/i386/apm.c  Wed Mar 15 07:17:06 2000 +0000
+++ b/sys/arch/i386/i386/apm.c  Wed Mar 15 09:30:11 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: apm.c,v 1.45 2000/03/04 21:37:23 mycroft Exp $ */
+/*     $NetBSD: apm.c,v 1.46 2000/03/15 09:30:11 fvdl Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -1328,7 +1328,7 @@
                APM_LOCK(apmsc);
                apm_periodic_check(apmsc);
                APM_UNLOCK(apmsc);
-               (void) tsleep(apmsc, PWAIT, "apmev", hz);
+               (void) tsleep(apmsc, PWAIT, "apmev",  (8 * hz) / 7);
        }
 }
 



Home | Main Index | Thread Index | Old Index