All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: Yi Zhang <yi.zhang@redhat.com>
Cc: hch@lst.de, sagi@grimberg.me, kch@nvidia.com,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH RFC] nvmet-tcp: add new workqueue to surpress lockdep warning
Date: Fri, 15 Sep 2023 15:40:08 +0800	[thread overview]
Message-ID: <044b5a7a-a8f4-e8d9-ce69-ee3d3c74462c@linux.dev> (raw)
In-Reply-To: <CAHj4cs_RiEb4SNdZ12xqEDgu7n-pObO6iUe8MMY6tq9xO6SLRQ@mail.gmail.com>



On 9/8/23 16:08, Yi Zhang wrote:
> On Thu, Sep 7, 2023 at 4:12 PM Guoqing Jiang <guoqing.jiang@linux.dev> wrote:
>> Hi Yi,
>>
>> On 9/7/23 14:41, Yi Zhang wrote:
>>> Tested-by: Yi Zhang <yi.zhang@redhat.com>
>>>
>>> Confirmed below issue was fixed by this patch:
>> Thanks a lot for the test!
>>
>> And I had got another similar lockdep warning about nvmet-rdma.
> Yeah, I've filed this one last year, but still not get one solution.
> https://lore.kernel.org/linux-rdma/13441b9b-cc13-f0e0-bd46-f14983dadd49@grimberg.me/

Hmm, it is a false alarm given the conn_id in cma_cm_event_handler is 
just created
by cma_ib_new_conn_id, so  conn_id should have different handler_mutex 
with listen_id
(which is the parent of conn_id)  though they share the same 
event_handler. And the
cm_id (listen_id) in the chain

nvmet_rdma_free_queue -> nvmet_rdma_destroy_queue_ib -> 
rdma_destroy_id(queue->cm_id)

should be created by rdma_create_idin nvmet_rdma_enable_port.

And the similar thing also had happened to rtrs.

https://lore.kernel.org/linux-rdma/CAMGffEm22sP-oKK0D9=vOw77nbS05iwG7MC3DTVB0CyzVFhtXg@mail.gmail.com/#t

>> Besides make similar change like this patch, another option might be
>> check queue state before
>> flush workqueue. Thoughts?
>>
>> --- a/drivers/nvme/target/rdma.c
>> +++ b/drivers/nvme/target/rdma.c
>> @@ -1582,7 +1582,8 @@ static int nvmet_rdma_queue_connect(struct
>> rdma_cm_id *cm_id,
>>                   goto put_device;
>>           }
>>
>> -       if (queue->host_qid == 0) {
>> +       if (queue->state == NVMET_RDMA_Q_LIVE &&
>> +           queue->host_qid == 0) {
>>                   /* Let inflight controller teardown complete */
>>                   flush_workqueue(nvmet_wq);
>>           }

I guess the above can suppress the false alarm as well or similar change 
as in this RFC.

BTW, I suggest we need to move forward from the lockdep's report by 
either suppress it
or ignore it to save people's time.

Thanks,
Guoqing


  reply	other threads:[~2023-09-15  7:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26 14:29 [PATCH RFC] nvmet-tcp: add new workqueue to surpress lockdep warning Guoqing Jiang
2023-09-07  6:41 ` Yi Zhang
2023-09-07  8:12   ` Guoqing Jiang
2023-09-08  7:15     ` Hannes Reinecke
2023-09-08  8:09       ` Yi Zhang
2023-09-08  8:44         ` Yi Zhang
2023-09-08  8:46           ` Hannes Reinecke
2023-09-08  8:57           ` Hannes Reinecke
2023-09-08  9:00             ` Yi Zhang
2023-09-11  5:54               ` Yi Zhang
2023-09-08  8:08     ` Yi Zhang
2023-09-15  7:40       ` Guoqing Jiang [this message]
2023-09-12 12:24 ` Sagi Grimberg
2023-09-13  1:51   ` Guoqing Jiang

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=044b5a7a-a8f4-e8d9-ce69-ee3d3c74462c@linux.dev \
    --to=guoqing.jiang@linux.dev \
    --cc=hch@lst.de \
    --cc=kch@nvidia.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=yi.zhang@redhat.com \
    /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 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.