Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jul 2013 13:43:56 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        Ian Smith <smithi@nimnet.asn.au>
Cc:        acpi@freebsd.org, Kevin Oberman <rkoberman@gmail.com>, wblock@freebsd.org
Subject:   Re: Hyper mode for powerd
Message-ID:  <alpine.BSF.2.00.1307101157460.64697@wonkity.com>
In-Reply-To: <20130710200113.J23480@sola.nimnet.asn.au>
References:  <alpine.BSF.2.00.1307041955110.10280@wonkity.com> <20130707003651.Y26496@sola.nimnet.asn.au> <alpine.BSF.2.00.1307062000220.45491@wonkity.com> <20130709145722.U61164@sola.nimnet.asn.au> <alpine.BSF.2.00.1307091058280.46436@wonkity.com> <20130710200113.J23480@sola.nimnet.asn.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 10 Jul 2013, Ian Smith wrote:

> > > > /etc/rc.conf:
> > > > powerd_flags="-a hyper -n hyper"
> > >
> > > Still on 9.1 at least,
> > > #define DEFAULT_ACTIVE_PERCENT	75
> > > #define DEFAULT_IDLE_PERCENT	50
> > > #define DEFAULT_POLL_INTERVAL	250	/* Poll interval in milliseconds */
> > >
> > > So hyper mode will select max freq if load at 1600MHz is > 75/4 = 18.75%
> > > after 250mS.  I use 200mS and there's no impact on powerd CPU usage even
> > > at my idle 733MHz; your responsiveness may benefit from using say 100mS?
> >
> > Interesting point.  100mS is a perceptible lag.
>
> Maybe just.  On that beast I think you could use 50ms with no noticeable
> powerd CPU usage, maybe even 25ms.  In fact I think doing just that with
> hadp mode might get you all the interactive responsiveness you want, and
> still let powerd use a range of freqs as required.  Playing with -r and
> -i will also alter the responsiveness curve quite a bit.
>
> With it then testing load and increasing frequency 5 times as often, on
> full load it should shift up 5 times more quickly, and hadp mode already
> shifts freq up by a factor of 4 on each poll_interval, so it should get
> from 1600 to 3601 in one! iteration, and even if using p4tcc/throttling,
> from 200 to 3601 in only two or three steps (200 x 4 = 800, 800 x 4 =
> 3200) with even three steps then taking only 150ms, well inside your
> current 250ms interval.  Maybe give that a try?

Wow!  -r 50 with either hadp or hyper mode feels fine interactively.

> > Timing 'periodic daily' now with a full cache and powerd not running:
> > 995.53 real        28.15 user       132.17 sys
> >
> > With 'powerd -a hyper -n hyper -v > /tmp/powerd.log':
> > 2322.06 real        58.72 user       305.22 sys
> >
> > Load varied enough that it would drop to 200MHz quite often.  Picking a
> > random part of the log:
> >
> > load   0%, current freq  200 MHz (26), wanted freq  200 MHz
> > load  10%, current freq  200 MHz (26), wanted freq  200 MHz
> > load   4%, current freq  200 MHz (26), wanted freq  200 MHz
> > now operating on AC power; changing frequency to 3601 MHz
> > load  55%, current freq  200 MHz (26), wanted freq 3601 MHz
> > changing clock speed from 200 MHz to 3601 MHz
> > now operating on AC power; changing frequency to 200 MHz
> > load   4%, current freq 3601 MHz ( 0), wanted freq  200 MHz
> > changing clock speed from 3601 MHz to 200 MHz
> > load   4%, current freq  200 MHz (26), wanted freq  200 MHz
> > now operating on AC power; changing frequency to 3601 MHz
> > load  20%, current freq  200 MHz (26), wanted freq 3601 MHz
> > changing clock speed from 200 MHz to 3601 MHz
> > now operating on AC power; changing frequency to 200 MHz
> > load   3%, current freq 3601 MHz ( 0), wanted freq  200 MHz

> Hunting away.

Is that a bad thing, though?  Effectively, it's just PWM, if you see 
what I mean.

> Over twice as long to run.  Maybe now try at 50ms in hadp mode and 
> you'll have a good idea how fast that runs, and how it feels.

The same periodic daily test as before, again with the first run 
discarded to load the cache.

powerd -a hyper -n hyper -p 50 -v > /tmp/powerd.log
977.44 real        47.79 user       238.48 sys

powerd -a hadp -n hadp -p 50 -v > /tmp/powerd.log
874.18 real        28.89 user       140.00 sys

> cheers, Ian (wishing momentarily I had one like yours to play with :)

It's nice. :)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1307101157460.64697>