From owner-freebsd-current Mon Sep 11 5:24:20 2000 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id DF59F37B423; Mon, 11 Sep 2000 05:24:13 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id XAA06663; Mon, 11 Sep 2000 23:24:05 +1100 Date: Mon, 11 Sep 2000 23:24:03 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Maxim Sobolev Cc: Valentin Nechayev , freebsd-current@FreeBSD.org Subject: Re: load average is 1 when no processes active; etc. In-Reply-To: <39BCBE78.7D17B24B@FreeBSD.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 11 Sep 2000, Maxim Sobolev wrote: > Bruce Evans wrote: > > Well, the kernel just doesn't treat it specially, so it gets counted in the > > load average. I'm not sure if the interrupt and other kernel processes > > are counted. Since they do useful work, they should be. The idle process > > does the not so useful work of heating the cpu, since it no longer halts > > or runs vm_page_zero_idle(). > > BTW, will it be fixed any time soon? Mobile users will certainly like to see idle process > halting CPU as it was before. Not sure. I use this quick fix: --- diff -c2 kern_idle.c~ kern_idle.c *** kern_idle.c~ Thu Sep 7 12:32:51 2000 --- kern_idle.c Sun Sep 10 18:06:39 2000 *************** *** 40,43 **** --- 50,55 ---- #endif + extern void (*_hlt_vector)(void); + static void idle_setup(void *dummy); SYSINIT(idle_setup, SI_SUB_SCHED_IDLE, SI_ORDER_FIRST, idle_setup, NULL) *************** *** 90,94 **** --- 102,116 ---- count = 0; + #ifdef __i386__ + disable_intr(); + #endif while (count >= 0 && procrunnable() == 0) { + #ifdef __i386__ + if (vm_page_zero_idle() != 0) + continue; + (*_hlt_vector)(); + disable_intr(); + continue; + #endif /* * This is a good place to put things to be done in *************** *** 99,102 **** --- 121,127 ---- " for a process"); } + #ifdef __i386__ + enable_intr(); + #endif mtx_enter(&sched_lock, MTX_SPIN); --- Add a bogus #include of to fix a warning. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message