Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759203AbXJKPTY (ORCPT ); Thu, 11 Oct 2007 11:19:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758606AbXJKPTG (ORCPT ); Thu, 11 Oct 2007 11:19:06 -0400 Received: from mga02.intel.com ([134.134.136.20]:8139 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758261AbXJKPTF (ORCPT ); Thu, 11 Oct 2007 11:19:05 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.21,260,1188802800"; d="scan'208";a="244656598" Message-ID: <470E3ED4.9020201@intel.com> Date: Thu, 11 Oct 2007 08:18:44 -0700 From: "Kok, Auke" User-Agent: Thunderbird 2.0.0.6 (X11/20070911) MIME-Version: 1.0 To: prasad@linux.vnet.ibm.com CC: Lennart Sorensen , Pavel Machek , Arjan van de Ven , kernel list Subject: Re: gigabit ethernet power consumption References: <20071008220720.GF3484@elf.ucw.cz> <470AAFD7.9060002@intel.com> <20071009182857.GF4003@csclub.uwaterloo.ca> <470BCB4D.8090307@intel.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 11 Oct 2007 15:19:03.0956 (UTC) FILETIME=[0EF32D40:01C80C1A] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3598 Lines: 81 K.Prasad wrote: > On Wed, 10 Oct 2007 00:11:17 +0530, Kok, Auke > wrote: > >> Lennart Sorensen wrote: >>> On Mon, Oct 08, 2007 at 03:31:51PM -0700, Kok, Auke wrote: >>>> you most certainly want to do this in userspace I think. >>>> >>>> One of the biggest problems is that link negotiation can take a >>>> significant amount >>>> of time, well over several seconds (1 to 3 seconds typical) with >>>> gigabit, and >>>> having your ethernet connection go offline for 3 seconds may not be >>>> the desired >>>> effect for when you want to get more bandwidth in the first place. >>>> >>>> However, when a laptop is in battery mode, switching down from >>>> gigabit to 100mbit >>>> makes a lot more sense, so this is something I would recommend. This >>>> can be as >>>> easy as changing the advertisement mask of the interface and >>>> renegotiating the >>>> link. Userspace could handle that very easily. >>> >>> Now if you were trying to transfer a lot of data to the laptop, would it >>> be more power efficient to do it at gigabit speeds so you can finish >>> sooner and shut down the machine entirely, or to slow to 100mbit and >>> take longer to do it, and hence spend more time powering the cpu and >>> ram? >> >> my suspicion is that the cost of switching is much higher than what >> you would >> consume running at 100mbit, even if the amount of data is quite large. >> going >> offline to renegotiate the link would already cost you 3W typically. >> >> I definately think that userspace is the right field to solve this >> problem: let >> the users decide how to use the available power on their sytems >> through a decent >> power profile tool (perhaps gnome-power-manager or something like >> that). This way >> the user can choose. >> >> Auke >> - > > Perhaps interrupt moderation could be of help here (say - switch to > lesser interrupts per unit of time when running on battery), which I > find that the e1000 driver doesn't employ in the kernel presently. (For > interrupt moderation, refer: > http://download.intel.com/design/network/applnots/ap450.pdf.) Not true, interrupt moderation has always been part of the e1000 driver in one form or another. In the basic form, you have always been able to set a manual rate, which might help somewhat because it reduces CPU wakeups on mostly-idle systems. Refer to the InterruptThrottleRate parameter of the e1000 module. recent version of the driver actually adjust the irq rate dynamically. > Without the side-effect of experiencing a link-flap when switching to a > lower-speed (with its toll in terms of down-time for auto-negotiation, > STP, etc), the Interrupt Moderation Algorithm dynamically adjusts the > number of interrupts based on traffic - and presumably consume less > power. For an "Optimise for Power" kind of profile - the driver can be > loaded with a higher throttle rate during boot-time. We're changing this to be run-time adjustable in newer drivers. However, the power consumed by your nic staying in gigabit mode is much greater in the long run then what you can save by trying to scrounge for milliwatts reducing interrupts generated by the nic. By default it already moderates them somewhat. Practically this feature is really not useful for powersaving, it just won't add up to actual benefits in a real life situtation I think. Auke - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/