From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755778Ab3ANDNq (ORCPT ); Sun, 13 Jan 2013 22:13:46 -0500 Received: from mga14.intel.com ([143.182.124.37]:54051 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755136Ab3ANDNo (ORCPT ); Sun, 13 Jan 2013 22:13:44 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,465,1355126400"; d="scan'208";a="243412551" Date: Mon, 14 Jan 2013 11:14:23 +0800 From: Aaron Lu To: Alan Stern Cc: Jens Axboe , "Rafael J. Wysocki" , James Bottomley , linux-pm@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Aaron Lu , Shane Huang Subject: Re: [PATCH v6 0/4] block layer runtime pm Message-ID: <20130114031422.GB15280@aaronlu.sh.intel.com> References: <50EBCBC3.4070606@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 08, 2013 at 10:27:54AM -0500, Alan Stern wrote: > On Tue, 8 Jan 2013, Aaron Lu wrote: > > > So this also reminds me that as long as CONFIG_PM_RUNTIME is selected, > > the blk_pm_add/put/peek_request functions will be in the block IO path. > > Shall we introduce a new config option to selectively build block > > runtime PM functionality? something like CONFIG_BLK_PM_RUNTIME perhaps? > > > > Just some condition checks in those functions, not sure if it is worth a > > new config though. Please suggest, thanks. > > I don't think it is needed. The new routines will be very quick when > blk_pm_runtime_init() hasn't been called, once you add back the checks > for the queue's device. Is it necessary to also add the q->dev check in the following case? static void blk_pm_requeue_request(struct request *rq) { if (rq->q->dev && !(rq->cmd_flags & REQ_PM)) rq->q->nr_pending--; } So that we do not have a meanlingless value of nr_pending for those drivers that don't use block runtime PM, and this also has the benefit of making those drivers return early. Thanks, Aaron