From: Himanshu Madhani <himanshu.madhani@oracle.com>
To: James Smart <james.smart@broadcom.com>
Cc: linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme-fc: wait for queues to freeze before calling update_hr_hw_queues
Date: Mon, 19 Oct 2020 09:57:14 -0500 [thread overview]
Message-ID: <14FF47F2-A7A4-4335-82D0-86615D1920DF@oracle.com> (raw)
In-Reply-To: <20201016211724.48707-1-james.smart@broadcom.com>
> On Oct 16, 2020, at 4:17 PM, James Smart <james.smart@broadcom.com> wrote:
>
> On reconnect, the code currently does not freeze the controller before
> possibly updating the number hw queues for the controller.
>
> Add the freeze before updating the number of hw queues. Note: the queues
> are already started and remain started through the reconnect.
>
> Signed-off-by: James Smart <james.smart@broadcom.com>
> ---
> drivers/nvme/host/fc.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> index c81ebe94d8fe..7067aaf50bf7 100644
> --- a/drivers/nvme/host/fc.c
> +++ b/drivers/nvme/host/fc.c
> @@ -2885,11 +2885,14 @@ nvme_fc_recreate_io_queues(struct nvme_fc_ctrl *ctrl)
> if (ret)
> goto out_delete_hw_queues;
>
> - if (prior_ioq_cnt != nr_io_queues)
> + if (prior_ioq_cnt != nr_io_queues) {
> dev_info(ctrl->ctrl.device,
> "reconnect: revising io queue count from %d to %d\n",
> prior_ioq_cnt, nr_io_queues);
> - blk_mq_update_nr_hw_queues(&ctrl->tag_set, nr_io_queues);
> + nvme_wait_freeze(&ctrl->ctrl);
> + blk_mq_update_nr_hw_queues(&ctrl->tag_set, nr_io_queues);
> + nvme_unfreeze(&ctrl->ctrl);
> + }
>
> return 0;
>
> --
> 2.26.2
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
Looks Good.
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
--
Himanshu Madhani Oracle Linux Engineering
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-10-19 14:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 21:17 [PATCH] nvme-fc: wait for queues to freeze before calling update_hr_hw_queues James Smart
2020-10-19 10:06 ` Hannes Reinecke
2020-10-19 14:57 ` Himanshu Madhani [this message]
2020-10-22 13:37 ` Christoph Hellwig
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=14FF47F2-A7A4-4335-82D0-86615D1920DF@oracle.com \
--to=himanshu.madhani@oracle.com \
--cc=james.smart@broadcom.com \
--cc=linux-nvme@lists.infradead.org \
/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