From patchwork Tue Jul 4 07:55:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 9824247 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 99E7560237 for ; Tue, 4 Jul 2017 07:55:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BCF5265B9 for ; Tue, 4 Jul 2017 07:55:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8024628417; Tue, 4 Jul 2017 07:55:54 +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=-5.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, URIBL_BLACK 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 06240265B9 for ; Tue, 4 Jul 2017 07:55:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752161AbdGDHzw (ORCPT ); Tue, 4 Jul 2017 03:55:52 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:58058 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751631AbdGDHzv (ORCPT ); Tue, 4 Jul 2017 03:55:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PyGTqa0JT0Qud8zUjMhzsVi6z5ToZztmep1d2iSn1Yw=; b=FiGu1DoB3SoOClKe6/OoZDiZM cTad8K/e1Ad6XW0sg2C3pMWXDOyS0TAVNv0VgnsYoNrEmev4Mq1W9R3gqd71Lo51x34ewVdh29MGo ryGhmPhBVrV/Q3UrIhjwSxffm2FvKK9mgL5dHJeo3rScO6iNRNaw3rMzI6Lk3qVPMJlxKTwrnLyis 83LgXV4GxUzHf+fjpq3OV91+tLOJrz9oKO3MfNgjDjPRvUn8/5pZ+CcKiG1t3BlvLqvaTwhTgW4KJ Wqq9A0tVKGrts/OynUrCPBwqd5llc2QN1QAwDNPUuIIn7QrFWiy6Y+G2QV4QJ5aZpsGCMVaLBhTC4 KJ/mSvuaA==; Received: from bzq-82-81-101-184.red.bezeqint.net ([82.81.101.184] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1dSIgW-0001E3-Do; Tue, 04 Jul 2017 07:55:50 +0000 From: Sagi Grimberg To: Jens Axboe , linux-block@vger.kernel.org, linux-nvme@lists.infradead.org Cc: Christoph Hellwig , Keith Busch Subject: [PATCH 2/8] nvme-fc: quiesce/unquiesce admin_q instead of start/stop its hw queues Date: Tue, 4 Jul 2017 10:55:06 +0300 Message-Id: <1499154912-10420-3-git-send-email-sagi@grimberg.me> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499154912-10420-1-git-send-email-sagi@grimberg.me> References: <1499154912-10420-1-git-send-email-sagi@grimberg.me> 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 unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues quiescing/unquiescing respects the submission path rcu grace. Also make sure to kick the requeue list when appropriate. Reviewed-By: James Smart Signed-off-by: Sagi Grimberg --- drivers/nvme/host/fc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index 50cc3b2b0e11..d63263f0b530 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c @@ -2320,8 +2320,10 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl) if (ret) goto out_delete_hw_queue; - if (ctrl->ctrl.state != NVME_CTRL_NEW) - blk_mq_start_stopped_hw_queues(ctrl->ctrl.admin_q, true); + if (ctrl->ctrl.state != NVME_CTRL_NEW) { + blk_mq_unquiesce_queue(ctrl->ctrl.admin_q); + blk_mq_kick_requeue_list(ctrl->ctrl.admin_q); + } ret = nvmf_connect_admin_queue(&ctrl->ctrl); if (ret) @@ -2475,7 +2477,7 @@ nvme_fc_delete_association(struct nvme_fc_ctrl *ctrl) * use blk_mq_tagset_busy_itr() and the transport routine to * terminate the exchanges. */ - blk_mq_stop_hw_queues(ctrl->ctrl.admin_q); + blk_mq_quiesce_queue(ctrl->ctrl.admin_q); blk_mq_tagset_busy_iter(&ctrl->admin_tag_set, nvme_fc_terminate_exchange, &ctrl->ctrl);