Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Sep 2000 01:44:20 +0900
From:      Takaya Ogawa <t-ogawa@triaez.kaisei.org>
To:        current@freebsd.org
Cc:        jasone@freebsd.org
Subject:   new idle_proc() makes my laptop very hot
Message-ID:  <867l85y9sr.wl@triaez.kaisei.org>

next in thread | raw e-mail | index | archive | help
--Multipart_Fri_Sep_22_01:44:20_2000-1
Content-Type: text/plain; charset=US-ASCII

Hi.

After new idle_proc() committed to the tree, my laptop
become very hot as if under heavy cpu load even when
cpu is actually 95%~ idle.

If I understand collectly, idle_proc() doesn't contain
any HLT instruction in i386 UP case which former
idle() had. 

Attached patch adds back the HLT in i386 UP case and
seems to fix my problem, although I'm totally
unfamiliar with SMP nor alpha.

Other than that, current runs quite fine in normal
operation here.

Thanks.

----------
Takaya Ogawa
t-ogawa@triaez.kaisei.org


--Multipart_Fri_Sep_22_01:44:20_2000-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="hlt.patch"
Content-Transfer-Encoding: 7bit

--- sys/sys/proc.h.orig	Wed Sep 20 06:48:38 2000
+++ sys/sys/proc.h	Wed Sep 20 06:49:04 2000
@@ -515,6 +515,7 @@
 void	remrunqueue __P((struct proc *));
 void	cpu_switch __P((void));
 void	cpu_throw __P((void)) __dead2;
+void	cpu_idle __P((void));
 void	unsleep __P((struct proc *));
 
 void	cpu_exit __P((struct proc *)) __dead2;
--- sys/i386/i386/swtch.s.orig	Wed Sep 20 06:49:54 2000
+++ sys/i386/i386/swtch.s	Wed Sep 20 06:51:33 2000
@@ -81,6 +81,12 @@
 	ret
 
 /*
+ * cpu_idle()
+ */
+ENTRY(cpu_idle)
+	jmp	*_hlt_vector
+
+/*
  * cpu_throw()
  */
 ENTRY(cpu_throw)
--- sys/kern/kern_idle.c.orig	Wed Sep 20 06:41:47 2000
+++ sys/kern/kern_idle.c	Wed Sep 20 06:49:44 2000
@@ -88,6 +88,7 @@
 		 * This is a good place to put things to be done in
 		 * the background, including sanity checks.
 		 */
+			cpu_idle();
 			if (count++ < 0)
 				CTR0(KTR_PROC, "idle_proc: timed out waiting"
 				    " for a process");

--Multipart_Fri_Sep_22_01:44:20_2000-1--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?867l85y9sr.wl>