From owner-freebsd-acpi@FreeBSD.ORG Wed May 16 17:07:48 2007 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E8D316A402 for ; Wed, 16 May 2007 17:07:48 +0000 (UTC) (envelope-from eric@anholt.net) Received: from vonnegut.anholt.net (69-30-77-85.dq1sn.easystreet.com [69.30.77.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3282113C480 for ; Wed, 16 May 2007 17:07:48 +0000 (UTC) (envelope-from eric@anholt.net) Received: from vonnegut.anholt.net (localhost [127.0.0.1]) by vonnegut.anholt.net (8.13.8/8.13.8) with ESMTP id l4GH4gq9023406; Wed, 16 May 2007 10:04:43 -0700 (PDT) (envelope-from eric@anholt.net) Received: (from anholt@localhost) by vonnegut.anholt.net (8.13.8/8.13.8/Submit) id l4GH4dVA023405; Wed, 16 May 2007 10:04:39 -0700 (PDT) (envelope-from eric@anholt.net) X-Authentication-Warning: vonnegut.anholt.net: anholt set sender to eric@anholt.net using -f From: Eric Anholt To: "Wilkinson, Alex" In-Reply-To: <20070516032813.GB3773@obelix.dsto.defence.gov.au> References: <20070515050404.GK49628@obelix.dsto.defence.gov.au> <1179249135.1149.21.camel@vonnegut> <20070516032813.GB3773@obelix.dsto.defence.gov.au> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ORwsV71zhU9vugyAB4Ir" Date: Wed, 16 May 2007 10:04:36 -0700 Message-Id: <1179335077.1149.90.camel@vonnegut> Mime-Version: 1.0 X-Mailer: Evolution 2.10.0 FreeBSD GNOME Team Port Cc: acpi@freebsd.org Subject: Re: PowerTOP for FreeBSD ? X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2007 17:07:48 -0000 --=-ORwsV71zhU9vugyAB4Ir Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2007-05-16 at 11:28 +0800, Wilkinson, Alex wrote: > 0n Tue, May 15, 2007 at 10:12:14AM -0700, Eric Anholt wrote:=20 >=20 > Heya Eric! >=20 > >Until we get tickless scheduling, it's not of much use. >=20 > I keep hearing about this "tickless scheduling" but know SFA about it. I = assume > it means no ticks (HZ) therefore tones less interrupts therefore less pow= er > consumption? Anyone got a link that explains exactly what it is ? Your processor has various power-saving states available to it when it's getting nothing done, which we enter through ACPI calls. The deeper states turn more and more of the chip off, so there's more work to be done to bring it back to functionality when it wakes up. That means there's added latency. Additionally, there's a power cost in making the transition -- in one table I saw, for example, C3 (2 watts instead of 6 or 8 watts or something) was worthwhile only if you managed to stay there for about 2ms or more. So, if you're running a 100mhz (or more) tick to run your scheduler and check your various timers, you're never going to get into C3 (or, you'd better not be). The solution is to move to tickless scheduling, where you just have a list of timeouts, including when you need to preempt the running thread next, and just set your timer to interrupt you when the next one is due to land, rather than checking to see if it's time yet every 1/HZ. > >However, the power savings on desktop machines from going tickless a= nd > >fixing stupid apps is pretty amazing -- the keithp quote about > >increasing battery life by over 50% was after only about two days of > >fixing stupid apps, and we're looking at trying to do even better fo= r > >certain situations (let the cpu sleep for several frames at a time w= hile > >playing movies, for example). Most of the app fixes that intel peop= le > >playing with this tool have have developed (which has included at le= ast > >ff, evolution, xchat, gaim, network mangler, xf86-video-intel, and > >gnome-terminal) have been pushed upstream already, so we should all = be > >seeing the wins soon if we can go tickless. Until then, we'll just = get > >the benefit of not blowing out caches and saving some context switch= es > >from apps waking up in order to do nothing. >=20 > What is meant by "stupid apps" ? Things like above, where apps are running a 10hz timer to check timeouts of various tasks, just like our kernel is doing, but with a little thought they can determine just how long they need to sleep for. --=20 Eric Anholt anholt@FreeBSD.org eric@anholt.net eric.anholt@intel.com --=-ORwsV71zhU9vugyAB4Ir Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBGSzmkHUdvYGzw6vcRAhVuAJ0dwuBFPzQGT2CoeoF52UlhzG8xNwCgis0F /DFmJJ18ojRpyVUT3CJDTzY= =o50v -----END PGP SIGNATURE----- --=-ORwsV71zhU9vugyAB4Ir--