From owner-freebsd-acpi@FreeBSD.ORG Fri Sep 9 01:04:09 2005 Return-Path: X-Original-To: acpi@FreeBSD.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9379216A41F; Fri, 9 Sep 2005 01:04:09 +0000 (GMT) (envelope-from nate@root.org) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42CF543D45; Fri, 9 Sep 2005 01:04:09 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.33] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j8913xo5028767 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 8 Sep 2005 18:04:00 -0700 Message-ID: <4320DF79.7090205@root.org> Date: Thu, 08 Sep 2005 18:03:53 -0700 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Oberman References: <20050901144711.B91E15D07@ptavv.es.net> In-Reply-To: <20050901144711.B91E15D07@ptavv.es.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: acpi@FreeBSD.org, Hajimu UMEMOTO , Bruno Ducrot Subject: Re: cvs commit: src/usr.sbin/powerd powerd.c 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: Fri, 09 Sep 2005 01:04:09 -0000 Kevin Oberman wrote: >>Date: Tue, 30 Aug 2005 11:11:26 -0700 >>From: Nate Lawson >>We do use C3+ if supported, and I agree it gives more power savings when >>active. But even an idle system gets periodic timer interrupts, battery >>polling, and other events that require it to exit C3. So running at a >>low CPU rate via throttling may conserve power when not in C3. > > > And, of course, if you have USB devices, you can never make it to > C3. :-( > > I admit I don't understand the issues with USB that cause this, but > fixing that would likely do more to increase battery life than anything > else, save the ability to drop the CPU actual clock speed (which we now > have for most recent mobile platforms). To go into C3, there are a number of conditions that need to be satisfied. One is that there cannot be any bus masters active since the CPU's cache does no snooping while in C3. However, our current USB hci drivers always leave the port in RUN mode which means it is always bus mastering. Hence C3 can't be used when uchi/ohci/ehci are loaded. They do this to get an interrupt when a device is inserted/removed from a USB port. The right fix is to change the hci drivers to suspend the port most of the time and only enable it periodically to check for device events. This would allow C3 to be used. In the UHCI 1.1d spec, section 2.1.1 "USBCMD register" describes the bits needed to make this happen. The Run/Stop bit needs to be set to 0 and then Enter Global Suspend should be set. I think this is the right sequence. Similar work would need to be done for ohci and ehci. -- Nate