Subject: set CPU speed ?
To: None <netbsd-users@netbsd.org>
From: Joel CARNAT <joel@carnat.net>
List: netbsd-users
Date: 10/25/2004 21:07:43
Hi,

can find on google if it's possible, with NetBSD, to slow down CPU speed ?
it seems Linux and FreeBSD have such things (with /proc and hw.acpi.cpu.economy_speed).

What I have is :
**********
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Pentium 4 (686-class), 2532.78 MHz, id 0xf27
cpu0: features bfebf9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
cpu0: features bfebf9ff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
cpu0: features bfebf9ff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
cpu0: I-cache 12K uOp cache 8-way, D-cache 8 KB 64B/line 4-way
cpu0: L2 cache 512 KB 64B/line 8-way
cpu0: ITLB 4K/4M: 128 entries
cpu0: DTLB 4K/4M: 64 entries
cpu0: 16 page colors
**********
acpi0 at mainbus0
acpi0: using Intel ACPI CA subsystem version 20040211
acpi0: X/RSDT: OemId <PTLTD ,Sheeks  ,06040000>, AslId < LTP,00000000>
acpi0: SCI interrupting at int 9
ACPI Object Type 'Processor' (0x0c) at acpi0 not configured
acpiacad0 at acpi0 (ACPI0003): ACPI AC Adapter
acpibat0 at acpi0 (PNP0C0A-1): ACPI Battery (Control Method)
acpibat1 at acpi0 (PNP0C0A-2): ACPI Battery (Control Method)
acpibut0 at acpi0 (PNP0C0C): ACPI Power Button
acpilid0 at acpi0 (PNP0C0D): ACPI Lid Switch
acpibut1 at acpi0 (PNP0C0E): ACPI Sleep Button
acpiec0 at acpi0 (PNP0C09): ACPI Embedded Controller
acpiec0: io 0x62,0x66
acpitz0 at acpi0: ACPI Thermal Zone
acpitz0: unable to get polling interval; using default of 30.0s
acpibat0: battery info: NOTEBOOK, LION, BAT1, 0001
**********

nothing that looks good in `sysctl -a | grep hw`.
what are the rlimit in `sysctl -a | grep cpu` ?
**********
kern.ccpu = 1948
hw.ncpu = 1
proc.curproc.rlimit.cputime.soft = unlimited
proc.curproc.rlimit.cputime.hard = unlimited
**********

why slowing down CPU ? because this is a laptop and the fan is really noisy (altough sensor says it's 41C).
the idea is to manually slow it down when I do normal things and speed it up when I'm in compiling mode.
I hope this would cool the CPU and stop the FAN.

TIA,
	Jo