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 <machine/md_var.h> to fix a warning.

Bruce



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to