From owner-freebsd-acpi@FreeBSD.ORG Wed Jul 10 19:43:58 2013 Return-Path: Delivered-To: acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E2C7E137; Wed, 10 Jul 2013 19:43:58 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 922D317C4; Wed, 10 Jul 2013 19:43:58 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.7/8.14.7) with ESMTP id r6AJhvu5065423; Wed, 10 Jul 2013 13:43:57 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.7/8.14.7/Submit) with ESMTP id r6AJhuox065420; Wed, 10 Jul 2013 13:43:57 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Wed, 10 Jul 2013 13:43:56 -0600 (MDT) From: Warren Block To: Ian Smith Subject: Re: Hyper mode for powerd In-Reply-To: <20130710200113.J23480@sola.nimnet.asn.au> Message-ID: References: <20130707003651.Y26496@sola.nimnet.asn.au> <20130709145722.U61164@sola.nimnet.asn.au> <20130710200113.J23480@sola.nimnet.asn.au> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Wed, 10 Jul 2013 13:43:57 -0600 (MDT) Cc: acpi@freebsd.org, Kevin Oberman , wblock@freebsd.org X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jul 2013 19:43:59 -0000 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. :)