All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-multipath: allocate MQ disk
@ 2022-06-09 17:37 Vitaly Mayatskikh
  2022-06-09 17:49 ` Keith Busch
  2022-06-10  5:59 ` Christoph Hellwig
  0 siblings, 2 replies; 5+ messages in thread
From: Vitaly Mayatskikh @ 2022-06-09 17:37 UTC (permalink / raw)
  To: linux-nvme; +Cc: Christoph Hellwig

nvme_mpath_alloc_disk() allocates gendisk with blk_alloc_disk(), which
results in no MQ support even if the head device has it.

Signed-off-by: Vitaly Mayatskikh <vitaly@enfabrica.net>
---
 drivers/nvme/host/multipath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index d3e2440d8abb..3f085f838910 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -490,7 +490,7 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
 	    !nvme_is_unique_nsid(ctrl, head) || !multipath)
 		return 0;
 
-	head->disk = blk_alloc_disk(ctrl->numa_node);
+	head->disk = blk_mq_alloc_disk(ctrl->tagset, NULL);
 	if (!head->disk)
 		return -ENOMEM;
 	head->disk->fops = &nvme_ns_head_ops;
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] nvme-multipath: allocate MQ disk
  2022-06-09 17:37 [PATCH] nvme-multipath: allocate MQ disk Vitaly Mayatskikh
@ 2022-06-09 17:49 ` Keith Busch
  2022-06-09 18:23   ` Vitaly Mayatskikh
  2022-06-10  5:59 ` Christoph Hellwig
  1 sibling, 1 reply; 5+ messages in thread
From: Keith Busch @ 2022-06-09 17:49 UTC (permalink / raw)
  To: Vitaly Mayatskikh; +Cc: linux-nvme, Christoph Hellwig

On Thu, Jun 09, 2022 at 01:37:34PM -0400, Vitaly Mayatskikh wrote:
> @@ -490,7 +490,7 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
>  	    !nvme_is_unique_nsid(ctrl, head) || !multipath)
>  		return 0;
>  
> -	head->disk = blk_alloc_disk(ctrl->numa_node);
> +	head->disk = blk_mq_alloc_disk(ctrl->tagset, NULL);

No, we don't use request based queues for stacking drivers. Especially not one
that re-uses the same tagset with the lower layer it stacks on.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] nvme-multipath: allocate MQ disk
  2022-06-09 17:49 ` Keith Busch
@ 2022-06-09 18:23   ` Vitaly Mayatskikh
  0 siblings, 0 replies; 5+ messages in thread
From: Vitaly Mayatskikh @ 2022-06-09 18:23 UTC (permalink / raw)
  To: Keith Busch; +Cc: linux-nvme

On Thu, Jun 9, 2022 at 1:49 PM Keith Busch <kbusch@kernel.org> wrote:

> No, we don't use request based queues for stacking drivers. Especially not one
> that re-uses the same tagset with the lower layer it stacks on.

Yeah, I screwed up my test bench and misdiagnosed the problem. Sorry about that.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] nvme-multipath: allocate MQ disk
  2022-06-09 17:37 [PATCH] nvme-multipath: allocate MQ disk Vitaly Mayatskikh
  2022-06-09 17:49 ` Keith Busch
@ 2022-06-10  5:59 ` Christoph Hellwig
  2022-06-10 14:25   ` Vitaly Mayatskikh
  1 sibling, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2022-06-10  5:59 UTC (permalink / raw)
  To: Vitaly Mayatskikh; +Cc: linux-nvme, Christoph Hellwig

On Thu, Jun 09, 2022 at 01:37:34PM -0400, Vitaly Mayatskikh wrote:
> nvme_mpath_alloc_disk() allocates gendisk with blk_alloc_disk(), which
> results in no MQ support even if the head device has it.

This can't work.  Can you explain hw you came up with this idea and
why you decided to send it out without any testing at all?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] nvme-multipath: allocate MQ disk
  2022-06-10  5:59 ` Christoph Hellwig
@ 2022-06-10 14:25   ` Vitaly Mayatskikh
  0 siblings, 0 replies; 5+ messages in thread
From: Vitaly Mayatskikh @ 2022-06-10 14:25 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-nvme

On Fri, Jun 10, 2022 at 1:59 AM Christoph Hellwig <hch@lst.de> wrote:

> This can't work.  Can you explain hw you came up with this idea and
> why you decided to send it out without any testing at all?

That was a mistake in my setup that I misdiagnosed. Sorry.

The patch actually worked (as in "nothing crashed") in the simplest test.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-10 14:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 17:37 [PATCH] nvme-multipath: allocate MQ disk Vitaly Mayatskikh
2022-06-09 17:49 ` Keith Busch
2022-06-09 18:23   ` Vitaly Mayatskikh
2022-06-10  5:59 ` Christoph Hellwig
2022-06-10 14:25   ` Vitaly Mayatskikh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.