From patchwork Sat Aug 4 00:03:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10555575 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A18DC13AC for ; Sat, 4 Aug 2018 00:03:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E0ED2C913 for ; Sat, 4 Aug 2018 00:03:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 327AA2C971; Sat, 4 Aug 2018 00:03:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D42332C91B for ; Sat, 4 Aug 2018 00:03:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732090AbeHDCCB (ORCPT ); Fri, 3 Aug 2018 22:02:01 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:34555 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732150AbeHDCCA (ORCPT ); Fri, 3 Aug 2018 22:02:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1533341012; x=1564877012; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=5WJT3BJpez8UmTLcpNtNBO+pixyn/LNc6PmBgnCL7YA=; b=gNGH4nyYZwM6HO979yh0crOvvVit7UOwkjPeo6fcqs3jSeHNW9dgq065 xWHkHEzSbjG5YQW3uIoH+Z4oN/Ib45G6tPzdC7BCwbLcp/+9uER5vH+OO B72C0T+YfuMiBMj0D8XOVEToJzGzj6GSQam3PalL0otRBmKKZ2ExcVZO4 3uvnSHUJ8KLbtPqHWMw6khJ2g6C71GHxOAOauHr31I8I4jd6GFm9bKePu 9PaAlOZEN/ga0bZpRb/F18MGV4WU7JYJxyxyWP/NlcAvl5F1FPg3qS6x9 Njg0G0UmI7pB/2b7drJFzb8uildXO7uzGs5Qf6fRtn1/4tBph9xCX1KXT A==; X-IronPort-AV: E=Sophos;i="5.51,440,1526313600"; d="scan'208";a="90059282" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 04 Aug 2018 08:03:32 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP; 03 Aug 2018 16:51:15 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip01.wdc.com with ESMTP; 03 Aug 2018 17:03:27 -0700 From: Bart Van Assche To: Jens Axboe Cc: linux-block@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Jianchao Wang , Ming Lei , Alan Stern , Johannes Thumshirn Subject: [PATCH v4 10/10] blk-mq: Enable support for runtime power management Date: Fri, 3 Aug 2018 17:03:25 -0700 Message-Id: <20180804000325.3610-11-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180804000325.3610-1-bart.vanassche@wdc.com> References: <20180804000325.3610-1-bart.vanassche@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now that the blk-mq core processes power management requests (marked with RQF_PREEMPT) in other states than RPM_ACTIVE, enable runtime power management for blk-mq. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Jianchao Wang Cc: Ming Lei Cc: Alan Stern Cc: Johannes Thumshirn --- block/blk-pm.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/block/blk-pm.c b/block/blk-pm.c index 0708185ead61..583cfc04e869 100644 --- a/block/blk-pm.c +++ b/block/blk-pm.c @@ -66,12 +66,6 @@ void blk_pm_runtime_unlock(struct request_queue *q) */ void blk_pm_runtime_init(struct request_queue *q, struct device *dev) { - /* Don't enable runtime PM for blk-mq until it is ready */ - if (q->mq_ops) { - pm_runtime_disable(dev); - return; - } - q->dev = dev; q->rpm_status = RPM_ACTIVE; pm_runtime_set_autosuspend_delay(q->dev, -1);