From patchwork Thu Dec 13 06:38:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 10728097 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 CB9C43E9D for ; Thu, 13 Dec 2018 06:38:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B90E82A192 for ; Thu, 13 Dec 2018 06:38:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACB9F2A5BF; Thu, 13 Dec 2018 06:38:27 +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.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 502B42A192 for ; Thu, 13 Dec 2018 06:38:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726998AbeLMGiX (ORCPT ); Thu, 13 Dec 2018 01:38:23 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:35064 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726777AbeLMGiX (ORCPT ); Thu, 13 Dec 2018 01:38:23 -0500 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=+dF7d4lFmK4aEgkQcqtZa7QfZBaKysEeaOd5SLzf1CY=; b=aJUm8D0beZHAdwNj0cECaGAHu UMtL5cWkBxlvL31zzgsvlPP7+GDAjvjNCjsDpVDaQjWTiX7+Yxl6fhseZYkV8eBiqpX4NaLn8JaDe Jb1r6KaRCRsbGNiZrPE8cadBShEBZuqu7P9MeYay0D/iDL++Qaro5HOsXrbXcpeW3dnntKp+8gC5r tX0OQdNkE8YPnNkYXrtRnf68Pu5hdC1qcX4PIFKP/jmfwnwP/JAxRgaR9xBGxt8DPAYgOPdbw3tDh 9lL1P5y1wa5FICLhEfIHrd9S8hhzIMUkJW1/nK5y8nB4QOktEzSa9xX169ifijaQb2BP924TbIdQU o6jp3JSgQ==; Received: from [2601:647:4800:973f:7888:b13c:bff:87b0] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gXKda-0006LR-2j; Thu, 13 Dec 2018 06:38:22 +0000 From: Sagi Grimberg To: linux-nvme@lists.infradead.org Cc: linux-block@vger.kernel.org, linux-rdma@vger.kernel.org, Christoph Hellwig , Keith Busch , Jens Axboe Subject: [PATCH v2 nvme-cli 7/6] fabrics: pass in number of polling queues Date: Wed, 12 Dec 2018 22:38:19 -0800 Message-Id: <20181213063819.13614-8-sagi@grimberg.me> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181213063819.13614-1-sagi@grimberg.me> References: <20181213063819.13614-1-sagi@grimberg.me> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP nr_poll_queues specifies the number of additional queues that will be connected for hosting polling latency critical I/O. Signed-off-by: Sagi Grimberg Signed-off-by: Steve Wise | -q ] [--nr-io-queues=<#> | -i <#>] [--nr-write-queues=<#> | -W <#>] + [--nr-poll-queues=<#> | -P <#>] [--queue-size=<#> | -Q <#>] [--keep-alive-tmo=<#> | -k <#>] [--reconnect-delay=<#> | -c <#>] @@ -80,6 +81,10 @@ OPTIONS --nr-write-queues=<#>:: Adds additional queues that will be used for write I/O. +-P <#>:: +--nr-poll-queues=<#>:: + Adds additional queues that will be used for polling latency sensitive I/O. + -Q <#>:: --queue-size=<#>:: Overrides the default number of elements in the I/O queues created diff --git a/fabrics.c b/fabrics.c index 5cc1a795345a..efe2ce89cdca 100644 --- a/fabrics.c +++ b/fabrics.c @@ -54,6 +54,7 @@ static struct config { char *hostid; int nr_io_queues; int nr_write_queues; + int nr_poll_queues; int queue_size; int keep_alive_tmo; int reconnect_delay; @@ -624,6 +625,8 @@ static int build_options(char *argstr, int max_len) cfg.nr_io_queues) || add_int_argument(&argstr, &max_len, "nr_write_queues", cfg.nr_write_queues) || + add_int_argument(&argstr, &max_len, "nr_poll_queues", + cfg.nr_poll_queues) || add_int_argument(&argstr, &max_len, "queue_size", cfg.queue_size) || add_int_argument(&argstr, &max_len, "keep_alive_tmo", cfg.keep_alive_tmo) || @@ -704,6 +707,13 @@ retry: p += len; } + if (cfg.nr_poll_queues) { + len = sprintf(p, ",nr_poll_queues=%d", cfg.nr_poll_queues); + if (len < 0) + return -EINVAL; + p += len; + } + if (cfg.host_traddr) { len = sprintf(p, ",host_traddr=%s", cfg.host_traddr); if (len < 0)