Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932245AbcCUT1F (ORCPT ); Mon, 21 Mar 2016 15:27:05 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:36232 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757697AbcCUT1D (ORCPT ); Mon, 21 Mar 2016 15:27:03 -0400 Date: Mon, 21 Mar 2016 15:27:00 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Woojung.Huh@microchip.com cc: oneukum@suse.com, , , , , , , , , Subject: RE: [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM In-Reply-To: <9235D6609DB808459E95D78E17F2E43D404CC166@CHN-SV-EXMX02.mchp-main.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 955 Lines: 21 On Mon, 21 Mar 2016 Woojung.Huh@microchip.com wrote: > > But this leaves open the issue that querying the device too often will > > prevent it from going into autosuspend. It seems to me that the best > > way to deal with this is to make sure that the autosuspend timeout is > > shorter than the interal between queries, not to make the querying > > conditional on !runtime_auto. > > Short autosuspend timeout can affect performance. For instance our experiments showed that > shorter than 10sec timeout made Ethernet performance degrade because of wakeup delays. > So, just putting shorter timeout may have some side effects. Sure. This just means that you need a long statistics interval -- longer than the autosuspend timeout. That's why I suggested making the interval adjustable. Alternatively, you could automatically set the statistics interval to the autosuspend timeout (or 0 if autosuspend is disabled) plus some fixed value. Alan Stern