mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Meneghini <jmeneghi@redhat.com>
To: Bryan Gurney <bgurney@redhat.com>,
	linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org,
	kbusch@kernel.org, hch@lst.de, sagi@grimberg.me, axboe@kernel.dk
Cc: bmarzins@redhat.com
Subject: Re: [PATCH] nvme: remove multipath module parameter
Date: Tue, 18 Feb 2025 09:43:39 -0500	[thread overview]
Message-ID: <21abd9e4-de2f-4d9e-a6d2-700b3d326524@redhat.com> (raw)
In-Reply-To: <20250204211158.43126-1-bgurney@redhat.com>

Bryan,  See my comments below.

On 2/4/25 4:11 PM, Bryan Gurney wrote:
> diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
> index a85d190942bd..28ab868182b2 100644
> --- a/drivers/nvme/host/multipath.c
> +++ b/drivers/nvme/host/multipath.c
> @@ -9,11 +9,6 @@
>   #include <trace/events/block.h>
>   #include "nvme.h"
>   
> -bool multipath = true;
> -module_param(multipath, bool, 0444);
> -MODULE_PARM_DESC(multipath,
> -	"turn on native support for multiple controllers per subsystem");
> -
>   static const char *nvme_iopolicy_names[] = {
>   	[NVME_IOPOLICY_NUMA]	= "numa",
>   	[NVME_IOPOLICY_RR]	= "round-robin",
> @@ -632,9 +627,11 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
>   	 * We also do this for private namespaces as the namespace sharing flag
>   	 * could change after a rescan.
>   	 */
> +#ifdef CONFIG_NVME_MULTIPATH
>   	if (!(ctrl->subsys->cmic & NVME_CTRL_CMIC_MULTI_CTRL) ||
> -	    !nvme_is_unique_nsid(ctrl, head) || !multipath)
> +	    !nvme_is_unique_nsid(ctrl, head))
>   		return 0;
> +#endif

You don't need to add these #ifdef CONFIG_NVME_MULTIPATH conditional compile statements
to multipath.c because the multipath.c is not compiled when CONFIG_NVME_MULTIPATH=N.

These won't hurt anything, but they are redundant and we can make the patch smaller by removing them.

>   	blk_set_stacking_limits(&lim);
>   	lim.dma_alignment = 3;
> @@ -1038,10 +1035,11 @@ int nvme_mpath_init_identify(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
>   	size_t ana_log_size;
>   	int error = 0;
>   
> +#ifdef CONFIG_NVME_MULTIPATH
>   	/* check if multipath is enabled and we have the capability */
> -	if (!multipath || !ctrl->subsys ||
> -	    !(ctrl->subsys->cmic & NVME_CTRL_CMIC_ANA))
> +	if (!ctrl->subsys || !(ctrl->subsys->cmic & NVME_CTRL_CMIC_ANA))
>   		return 0;
> +#endif

Same here.

>   	/* initialize this in the identify path to cover controller resets */
>   	atomic_set(&ctrl->nr_active, 0);
> diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
> index 2c76afd00390..6dea04f05b59 100644
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -972,7 +972,6 @@ static inline void nvme_trace_bio_complete(struct request *req)
>   		trace_block_bio_complete(ns->head->disk->queue, req->bio);
>   }
>   

/John


      parent reply	other threads:[~2025-02-18 14:43 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04 21:11 Bryan Gurney
2025-02-13 20:37 ` John Meneghini
2025-02-17  8:08   ` Sagi Grimberg
2025-02-17 16:14     ` John Meneghini
2025-02-18  8:19       ` Sagi Grimberg
2025-02-18 14:05         ` John Meneghini
2025-02-18 14:57           ` John Meneghini
2025-02-18 15:06   ` Keith Busch
2025-02-18 16:31     ` John Meneghini
2025-02-18 17:15       ` Keith Busch
2025-02-18 23:06         ` John Meneghini
2025-02-18 23:30           ` Keith Busch
2025-02-19 14:47         ` Nilay Shroff
2025-02-20 11:05           ` Sagi Grimberg
2025-02-20 16:47             ` Keith Busch
2025-02-26  9:55               ` Hannes Reinecke
2025-03-05 14:15                 ` Christoph Hellwig
2025-03-05 15:17                   ` Keith Busch
2025-03-05 23:51                     ` Christoph Hellwig
2025-03-05 23:57                       ` Keith Busch
2025-03-06  0:03                         ` Christoph Hellwig
2025-03-06  0:15                           ` Keith Busch
2025-03-06  7:12                           ` Hannes Reinecke
2025-03-06 14:18                             ` Christoph Hellwig
2025-03-06 15:01                               ` Keith Busch
2025-03-06 15:16                                 ` Christoph Hellwig
2025-03-07  0:46                                   ` Keith Busch
2025-03-07 15:19                                     ` Nilay Shroff
2025-03-07 15:43                                       ` Keith Busch
2025-03-09 17:23                                         ` Nilay Shroff
2025-03-10 13:29                                           ` Christoph Hellwig
2025-03-12  3:47                                           ` John Meneghini
2025-03-12 15:26                                             ` Nilay Shroff
2025-03-10 13:28                                     ` Christoph Hellwig
2025-03-12  3:08                 ` John Meneghini
2025-02-18 14:26 ` John Meneghini
2025-02-18 16:41   ` John Meneghini
2025-02-18 14:43 ` John Meneghini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21abd9e4-de2f-4d9e-a6d2-700b3d326524@redhat.com \
    --to=jmeneghi@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=bgurney@redhat.com \
    --cc=bmarzins@redhat.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®