From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756500Ab1ISVF7 (ORCPT ); Mon, 19 Sep 2011 17:05:59 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:42600 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753863Ab1ISVF5 (ORCPT ); Mon, 19 Sep 2011 17:05:57 -0400 From: "Rafael J. Wysocki" To: Vincent Palatin Subject: Re: [RFC] PM / Runtime: decrease verbosity in kernel log Date: Mon, 19 Sep 2011 23:08:05 +0200 User-Agent: KMail/1.13.6 (Linux/3.1.0-rc4+; KDE/4.6.0; x86_64; ; ) Cc: Alan Stern , Linux PCI , Olof Johansson , Sameer Nanda , Ming Lei , linux-kernel@vger.kernel.org, Jesse Barnes References: <1316211355-2888-1-git-send-email-vpalatin@chromium.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109192308.06049.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, September 19, 2011, Vincent Palatin wrote: > On Sat, Sep 17, 2011 at 09:23, Alan Stern wrote: > > On Fri, 16 Sep 2011, Vincent Palatin wrote: > > > >> When activating the PCI runtime PM on a laptop, my kernel log is filled with > >> messages such as the following ones and can be hardly read to find interesting > >> information: > >> ehci_hcd 0000:00:1d.7: PME# disabled > >> ehci_hcd 0000:00:1d.7: PCI INT A -> GSI 16 (level, low) -> IRQ 16 > >> ehci_hcd 0000:00:1d.7: setting latency timer to 64 > >> ehci_hcd 0000:00:1d.7: PCI INT A disabled > >> ehci_hcd 0000:00:1d.7: PME# enabled > >> ehci_hcd 0000:00:1d.7: BAR 0: set to [mem 0x92205000-0x922053ff] (PCI address [0x92205000-0x922053ff]) > >> ehci_hcd 0000:00:1d.7: restoring config space at offset 0xf (was 0x100, writing 0x10b) > >> ehci_hcd 0000:00:1d.7: restoring config space at offset 0x1 (was 0x2900000, writing 0x2900002) > > ... > > > >> All those messages are triggered by the following cause, the laptop has a USB > >> 3G modem with USB autosuspend activated. The USB device will wake up about > >> every 30s to do some network related activities. Every time, the modem wakes > >> up this triggers the wake up of the attached EHCI/PCI USB host controller > >> which reconfigures its PCI interface, then everything go back to a suspended mode. > >> > >> Having the same 10 lines of log repeated is not really useful, but I probably > >> cannot totally remove them since there are somewhat useful for PCI hotplug > >> users and other PCI debugging. > >> So, my proposal is to create a new dev_printk macro : "dev_printk_norpm" which > >> outputs traces only when the device has not the runtime PM activated, > >> and guard those traces with it. > >> (cf the 2 patches in this thread as a PoC) > > > > Wouldn't it be easier just to change the existing messages to DEBUG > > level? Or are they more important than that? > > Yes, I can simply replace all those printk by dev_dbg traces. For my > use case, it's perfect. > My main concern was people using PCI hotplug, I think, then, their log > will remain mostly silent when inserting a card, I don't know if this > is acceptable or not. I think they don't really need that information except for debugging, right? Rafael