From patchwork Tue Dec 11 23:36:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 10725281 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 8FB0217FE for ; Tue, 11 Dec 2018 23:37:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8064B2B4A4 for ; Tue, 11 Dec 2018 23:37:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7453D2B61E; Tue, 11 Dec 2018 23:37:01 +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 F029C2B4A4 for ; Tue, 11 Dec 2018 23:37:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726227AbeLKXhA (ORCPT ); Tue, 11 Dec 2018 18:37:00 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:37304 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726201AbeLKXhA (ORCPT ); Tue, 11 Dec 2018 18:37:00 -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=tmCUpodaC14HxdBvhUMvpC4Z0CrR1akJvM7Cmg0Tlls=; b=rgjFxYra0uaonpX4Sxq6fv9AG 2zk83m4OFwdBCLNa2+QB9RS891ufTmRQgdE3YGacgmgk6TfeWnfJsKte/JlKLZoJsnuDF2LKMsi5g Smgf50ccRgfisKNJDEY+KyZAAQdFrp6P14i88jBk7hiPrcJ7rbAS5cUoMJQUvC8+KK0P0SqvYpVvS 0bpzweECc5esYc92OGd2ZbNH2xAwhEUaHH3rWPsB8wDoLq8+1zWLV/Qlaf7noPpAxNMgBeO1ow0nQ ott0jrNgdzXyOb+2qLg3V2+9RIcrv3z0g/6zu/EsImDVMv3z4RJ226m8oWwrZQGiZu+ZIe21KiS6x GJQI/FKmA==; Received: from [2600:1700:65a0:78e0:514:7862:1503:8e4d] (helo=sagi-Latitude-E7470.lbits) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWraE-0003uQ-ET; Tue, 11 Dec 2018 23:36:58 +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 Subject: [PATCH RFC nvme-cli 5/4] fabrics: pass in number of polling queues Date: Tue, 11 Dec 2018 15:36:52 -0800 Message-Id: <20181211233652.9705-6-sagi@grimberg.me> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181211233652.9705-1-sagi@grimberg.me> References: <20181211233652.9705-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 --- Documentation/nvme-connect.txt | 5 +++++ fabrics.c | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/Documentation/nvme-connect.txt b/Documentation/nvme-connect.txt index d4a0e6678475..5412472dbd35 100644 --- a/Documentation/nvme-connect.txt +++ b/Documentation/nvme-connect.txt @@ -17,6 +17,7 @@ SYNOPSIS [--hostnqn= | -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 bc6a0b7e4e21..214fce4c1b51 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) @@ -1020,6 +1030,7 @@ int connect(const char *desc, int argc, char **argv) {"hostid", 'I', "LIST", CFG_STRING, &cfg.hostid, required_argument, "user-defined hostid (if default not used)"}, {"nr-io-queues", 'i', "LIST", CFG_INT, &cfg.nr_io_queues, required_argument, "number of io queues to use (default is core count)" }, {"nr-write-queues", 'W', "LIST", CFG_INT, &cfg.nr_write_queues, required_argument, "number of write queues to use (default 0)" }, + {"nr-poll-queues", 'W', "LIST", CFG_INT, &cfg.nr_poll_queues, required_argument, "number of poll queues to use (default 0)" }, {"queue-size", 'Q', "LIST", CFG_INT, &cfg.queue_size, required_argument, "number of io queue elements to use (default 128)" }, {"keep-alive-tmo", 'k', "LIST", CFG_INT, &cfg.keep_alive_tmo, required_argument, "keep alive timeout period in seconds" }, {"reconnect-delay", 'c', "LIST", CFG_INT, &cfg.reconnect_delay, required_argument, "reconnect timeout period in seconds" },