From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9E88C48BDF for ; Tue, 15 Jun 2021 13:16:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A72A161465 for ; Tue, 15 Jun 2021 13:16:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230437AbhFONSS (ORCPT ); Tue, 15 Jun 2021 09:18:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230179AbhFONSR (ORCPT ); Tue, 15 Jun 2021 09:18:17 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F4DAC061574; Tue, 15 Jun 2021 06:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=qLPGexkyYM9Stdq39YTJB+tRWuoO4z3xvBgvAqEYJLU=; b=RRVq16UdE0V95vGQQqScEwzNhN Q+fKQVK9nbuQQVA19JfnpFkhzgoTpFe1Tnr9dUjR+0jpSYw4Z1Byz90/ItoHYC4izNlXsdmtvHRrf qbANMlhMDfi5XXcdb0nMXMYpEd89hD3Gi+evPovwPZqX1Sp68x9Rk0poWpZCwce0CTCENpb6cBoiB UtR6akwOAZvkYPOhqBPZxNGGwSxW2ToEm8b7eD2EZMgFJQZd2/Cm/e6Hm/L3IUzWufJUoZYL73XtB SylnL92aEgC0lHvlOUNctypODvibW2yclPSUZ0X5bTn4iVdRWWDp/1X2yuN1a3sVpHQqOktesBaVb +y690xxw==; Received: from [2001:4bb8:19b:fdce:9045:1e63:20f0:ca9] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1lt8uG-006nSt-7q; Tue, 15 Jun 2021 13:15:10 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Jeffle Xu , Ming Lei , Damien Le Moal , Keith Busch , Sagi Grimberg , "Wunderlich, Mark" , "Vasudevan, Anil" , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nvme@lists.infradead.org Subject: [PATCH 16/16] nvme-multipath: enable polled I/O Date: Tue, 15 Jun 2021 15:10:34 +0200 Message-Id: <20210615131034.752623-17-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210615131034.752623-1-hch@lst.de> References: <20210615131034.752623-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Set the poll queue flag to enable polling, given that the multipath node just dispatches the bios to a lower queue. Signed-off-by: Christoph Hellwig Tested-by: Mark Wunderlich --- drivers/nvme/host/multipath.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index f77b774699de..48ea649d6c24 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -450,6 +450,15 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head) blk_queue_flag_set(QUEUE_FLAG_NONROT, head->disk->queue); blk_queue_flag_set(QUEUE_FLAG_NOWAIT, head->disk->queue); + /* + * This assumes all controllers that refer to a namespace either + * support poll queues or not. That is not a strict guarantee, + * but if the assumption is wrong the effect is only suboptimal + * performance but not correctness problem. + */ + if (ctrl->tagset->nr_maps > HCTX_TYPE_POLL && + ctrl->tagset->map[HCTX_TYPE_POLL].nr_queues) + blk_queue_flag_set(QUEUE_FLAG_POLL, head->disk->queue); /* set to a default value of 512 until the disk is validated */ blk_queue_logical_block_size(head->disk->queue, 512); -- 2.30.2