Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jan 2008 09:03:49 -0800
From:      Nate Lawson <nate@root.org>
To:        =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= <des@des.no>
Cc:        freebsd-current@freebsd.org, Maxim Sobolev <sobomax@digifonica.com>, Igor Mozolevsky <igor@hybrid-lab.co.uk>, Stefan Lambrev <stefan.lambrev@moneybookers.com>
Subject:   Re: powerd adaptive mode latching
Message-ID:  <478F8A75.5010701@root.org>
In-Reply-To: <86myr4n4gp.fsf@ds4.des.no>
References:  <a2b6592c0801110351l382959ffh1d55f2bcd2e6ca1b@mail.gmail.com>	<a2b6592c0801111119r148d3697hf75a59b7bf74d540@mail.gmail.com>	<478930D2.90806@digifonica.com>	<200801171115.43663.doconnor@gsoft.com.au> <86myr4n4gp.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smørgrav wrote:
> "Daniel O'Connor" <doconnor@gsoft.com.au> writes:
>> One problem with it is that it lags behind actual usage by a few
>> seconds (presumably averaging it).
> 
> It is based on the (didle/dt) / (dtotal/dt) fraction computed from
> kern.cp_time, which can take a while to ramp up.  This is not easily
> seen in a cursory reading of the code, as the fraction is computed in a
> very roundabout way.

While providing more accurate information to powerd is a good goal, I 
want to preempt any requests to move the scheduling algorithm into the 
kernel.  Until we're making multiple changes a second by necessity, 
there's no reason to have the scheduler there.  Note that inefficiencies 
in the current scheduling algorithm (2x up, 1x down) are not a cause to 
make decisions more quickly.

The path should be first fix the algorithm by profiling replacements, 
then improve the liveness of data provided to it.

>> Turning the LCD off saves about 4W too.
> 
> Hmm, it would be interesting to experiment with varying backlight
> brightness based on system load :)

I think xscreensaver could do some of this based on interactivity.  It 
already can blank the screen with dpms.  Macbooks slowly dim before 
blanking.  I often have a bg job that uses a lot of cpu (buildkernel?) 
so using cpu load wouldn't be good.

-- 
Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?478F8A75.5010701>