Re: [PATCH v4 2/8] nvme-tcp: Update number of hardware queues before using them

Keith Busch
2021-08-11T01:08:00Z

On Tue, Aug 10, 2021 at 06:00:37PM -0700, Sagi Grimberg wrote:
>
>
> On 8/9/21 1:52 AM, Daniel Wagner wrote:
> > Hi Sagi,
> >
> > On Fri, Aug 06, 2021 at 12:57:17PM -0700, Sagi Grimberg wrote:
> > > > - ret = nvme_tcp_start_io_queues(ctrl);
> > > > - if (ret)
> > > > - goto out_cleanup_connect_q;
> > > > -
> > > > - if (!new) {
> > > > - nvme_start_queues(ctrl);
> > > > + } else if (prior_q_cnt != ctrl->queue_count) {
> > >
> > > So if the queue count did not change we don't wait to make sure
> > > the queue g_usage_counter ref made it to zero? What guarantees that it
> > > did?
> >
> > Hmm, good point. we should always call nvme_wait_freeze_timeout()
> > for !new queues. Is this what you are implying?
>
> I think we should always wait for the freeze to complete.

Don't the queues need to be started in order for the freeze to complete?
Any enqueued requests on the quiesced queues will never complete this
way, so the wait_freeze() will be stuck, right? If so, I think the
nvme_start_queues() was in the correct place already.