diff mbox

[rfc,28/30] nvme: update tagset nr_hw_queues when reallocating io queues

Message ID 1497799324-19598-29-git-send-email-sagi@grimberg.me (mailing list archive)
State New, archived
Headers show

Commit Message

Sagi Grimberg June 18, 2017, 3:22 p.m. UTC
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
---
 drivers/nvme/host/core.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Christoph Hellwig June 19, 2017, 7:21 a.m. UTC | #1
On Sun, Jun 18, 2017 at 06:22:02PM +0300, Sagi Grimberg wrote:
> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>

Could use a changelog.

Ming: does this solve your problem of not seeing the new queues
after a qemu CPU hotplug + reset?

> ---
>  drivers/nvme/host/core.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 6937ba26ff2c..476c49c0601f 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -2776,6 +2776,9 @@ int nvme_configure_io_queues(struct nvme_ctrl *ctrl, bool new)
>  		ret = blk_mq_reinit_tagset(ctrl->tagset);
>  		if (ret)
>  			goto out_free_io_queues;
> +
> +		blk_mq_update_nr_hw_queues(ctrl->tagset,
> +				ctrl->queue_count - 1);
>         }
>  
>  	ret = nvme_start_io_queues(ctrl);
> -- 
> 2.7.4
---end quoted text---
Ming Lei June 19, 2017, 8:06 a.m. UTC | #2
On Mon, Jun 19, 2017 at 09:21:48AM +0200, Christoph Hellwig wrote:
> On Sun, Jun 18, 2017 at 06:22:02PM +0300, Sagi Grimberg wrote:
> > Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
> 
> Could use a changelog.
> 
> Ming: does this solve your problem of not seeing the new queues
> after a qemu CPU hotplug + reset?

The issue I observed is that there isn't NVMe reset triggered after
CPU becomes online.

It may take a while since the test need to apply the whole patchset.
Or is it fine to figure out one fix on this issue? Sagi?

Once the test is done, I will update with you.

Thanks,
Ming
Sagi Grimberg June 19, 2017, 4:21 p.m. UTC | #3
>>> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
>>
>> Could use a changelog.
>>
>> Ming: does this solve your problem of not seeing the new queues
>> after a qemu CPU hotplug + reset?
> 
> The issue I observed is that there isn't NVMe reset triggered after
> CPU becomes online.

This won't help with that.

> It may take a while since the test need to apply the whole patchset.
> Or is it fine to figure out one fix on this issue? Sagi?

No need, all this doesn't even touch pci for now...
diff mbox

Patch

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 6937ba26ff2c..476c49c0601f 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2776,6 +2776,9 @@  int nvme_configure_io_queues(struct nvme_ctrl *ctrl, bool new)
 		ret = blk_mq_reinit_tagset(ctrl->tagset);
 		if (ret)
 			goto out_free_io_queues;
+
+		blk_mq_update_nr_hw_queues(ctrl->tagset,
+				ctrl->queue_count - 1);
        }
 
 	ret = nvme_start_io_queues(ctrl);