On Sat, Oct 06, 2012 at 07:50:23PM +0000, Andriy Gapon wrote:
> Author: avg
> Date: Sat Oct  6 19:50:23 2012
> New Revision: 241295
> URL: http://svn.freebsd.org/changeset/base/241295
> 
> Log:
>   cngetc: use cpu_spinwait to ease the cncheckc loop a tiny bit

This doesn't really help me. On machine that I tried something similar,
with this patch CPU fan still goes crazy when I enter DDB.

What did work for me was to reduce CPU speed to supported minimum.
Entering DDB then did not result in CPU fan speed up.

If something like this could be done automatically, that would be great.

>   Reviewed by:        julian
>   MFC after:  10 days
> 
> Modified:
>   head/sys/kern/kern_cons.c
> 
> Modified: head/sys/kern/kern_cons.c
> ==============================================================================
> --- head/sys/kern/kern_cons.c Sat Oct  6 19:48:15 2012        (r241294)
> +++ head/sys/kern/kern_cons.c Sat Oct  6 19:50:23 2012        (r241295)
> @@ -384,7 +384,7 @@ cngetc(void)
>       if (cn_mute)
>               return (-1);
>       while ((c = cncheckc()) == -1)
> -             ;
> +             cpu_spinwait();
>       if (c == '\r')
>               c = '\n';               /* console input is always ICRNL */
>       return (c);

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl

Attachment: pgpvP05TGTag7.pgp
Description: PGP signature

Reply via email to