Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jan 2003 16:04:41 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Wilko Bulte <wkb@freebie.xs4all.nl>
Cc:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, Nate Lawson <njl@FreeBSD.ORG>
Subject:   Re: cvs commit: src/sys/dev/acpica acpi_cpu.c
Message-ID:  <XFMail.20030114160441.jhb@FreeBSD.org>
In-Reply-To: <20030114211406.A29186@freebie.xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help

On 14-Jan-2003 Wilko Bulte wrote:
> On Tue, Jan 14, 2003 at 02:54:13PM -0500, John Baldwin wrote:
>> 
>> On 14-Jan-2003 Nate Lawson wrote:
>> > njl         2003/01/14 11:39:41 PST
>> > 
>> >   Modified files:
>> >     sys/dev/acpica       acpi_cpu.c 
>> >   Log:
>> >   For the cpu throttling message, s/enabled/available
>> >   
>> >   Requested by:   many
>> 
>> Albeit lying.  If it were just available but not enabled, then the
>> CPU wouldn't slow down when I pulled the power cord of out my laptop.
>> However, when I pull the power cord out of my laptop, the CPU does
>> slow down.  Thus, it would seem rather obvious that CPU throttling
>> is most certainly enabled and not just available.
> 
> How does this work on desktops? I've seen one of my P2 boxes report
> this throttling thing?
> 
> Surely not the power plug being pulled out, although it slowed down
> greatly when pulled ;)

Here's how our current throttling works.  Your CPU can run at 8
different speeds.  There are 4 sysctl's related to this:

> sysctl hw.acpi.cpu
hw.acpi.cpu.max_speed: 8
hw.acpi.cpu.current_speed: 8
hw.acpi.cpu.performance_speed: 8
hw.acpi.cpu.economy_speed: 6

Currently we only throttle when switching between 'performance'
and 'economy' modes.  'performance' mode is defined to be the state
in which AC power is available to the system.  'economy' mode is
defined to be the state in which AC power is not available.  Thus,
it is currently a very limited policy, but it doesn't prohibit more
aggressive policies in the future.  You could change the speed on
your desktop by changing the performance speed to be 6 (75%) using
the sysctl for example:

> sudo sysctl hw.acpi.cpu.performance_speed=6
Password:
hw.acpi.cpu.performance_speed: 8 -> 6

> sysctl hw.acpi.cpu.current_speed 
hw.acpi.cpu.current_speed: 6

This was on my laptop with the power plugged in, but you could do
the same on a desktop machine.  Eventually we may define more
complex policies that slow the CPU down to conserve power if the
system is largely idle for example.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030114160441.jhb>