Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757456AbcCURei (ORCPT ); Mon, 21 Mar 2016 13:34:38 -0400 Received: from mx2.suse.de ([195.135.220.15]:51292 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757376AbcCUReg (ORCPT ); Mon, 21 Mar 2016 13:34:36 -0400 Message-ID: <1458581670.9609.5.camel@suse.com> Subject: Re: [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM From: Oliver Neukum To: Alan Stern Cc: Geert Uytterhoeven , Woojung Huh , Microchip Linux Driver Support , "David S. Miller" , Guenter Roeck , "Rafael J. Wysocki" , netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 21 Mar 2016 18:34:30 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 882 Lines: 25 On Mon, 2016-03-21 at 10:57 -0400, Alan Stern wrote: > One possible solution is to export a sysfs parameter to prevent > statistics collection (or more generally, to change the interval at > which it occurs). Surely, not performing a task can hardly be beaten in terms of power consumption. That is not meant to be flippant, but I think these issues are orthogonal. The question of how much to do doesn't solve the question of doing efficiently what we do. > But checking the runtime_auto flag is probably not a great idea. Even > if it isn't set, collecting statistics is likely to wait up a device > that otherwise would have remained suspended. > > Perhaps the best solution is to collect the statistics only when the > device is not suspended or is about to suspend. If we know when the next activity will come, why not pass this information down? Regards Oliver