Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759763Ab3E3BF3 (ORCPT ); Wed, 29 May 2013 21:05:29 -0400 Received: from mga14.intel.com ([143.182.124.37]:27493 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754763Ab3E3BFV (ORCPT ); Wed, 29 May 2013 21:05:21 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,767,1363158000"; d="scan'208";a="309818396" Message-ID: <51A6A5E7.1040601@intel.com> Date: Thu, 30 May 2013 09:05:43 +0800 From: Aaron Lu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 MIME-Version: 1.0 To: "Rafael J. Wysocki" CC: Alan Stern , Linux PM list , ACPI Devel Maling List , LKML , Greg Kroah-Hartman , Bjorn Helgaas , Linux PCI , Kevin Hilman , Mika Westerberg Subject: Re: [PATCH RFC] PM / Runtime: Rework the "runtime idle" helper routine References: <1645401.1grgttHPMR@vostro.rjw.lan> In-Reply-To: <1645401.1grgttHPMR@vostro.rjw.lan> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1531 Lines: 34 On 05/30/2013 06:18 AM, Rafael J. Wysocki wrote: > On Wednesday, May 29, 2013 10:51:11 AM Alan Stern wrote: >> On Wed, 29 May 2013, Rafael J. Wysocki wrote: >> >>> From: Rafael J. Wysocki >>> >>> The "runtime idle" helper routine, rpm_idle(), currently ignores >>> return values from .runtime_idle() callbacks executed by it. >>> >>> However, it turns out that many subsystems use the generic idle >>> callback routine pm_generic_runtime_idle() which checks the return >>> value of the driver's callback and executes pm_runtime_suspend() for >>> the device unless that value is different from 0. If that logic is >>> moved to rpm_idle() instead, pm_generic_runtime_idle() can be dropped >>> and its users will not need any .runtime_idle() callbacks any more. >> >> Since you're making this change, wouldn't it be a good idea to adopt >> Mika's original suggestion and turn on the RPM_AUTO bit in rpmflags >> when the use_autosuspend flag is set? > > I'm not actually sure. It can be done, but I'd prefer to do that as a separate > change in any case. For SCSI idle callback, that would be a welcome change, where instead of calling pm_runtime_autosuspend and then return -EBUSY, it can be changed to simply return 0 after mark_last_busy. Thanks, Aaron -- 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/