[PATCH] nvme-pci: silence a lockdep complaint

Sagi Grimberg sagi at grimberg.me
Thu May 23 06:02:43 PDT 2024



On 23/05/2024 15:39, Christoph Hellwig wrote:
> On Thu, May 23, 2024 at 01:04:13PM +0300, Sagi Grimberg wrote:
>>
>> On 23/05/2024 9:54, Christoph Hellwig wrote:
>>> On Wed, May 22, 2024 at 03:36:19PM -0600, Keith Busch wrote:
>>>> The below patch is what I'm messing with. I have a CMIC PCI NVMe and
>>>> nvme native multipathing enabled, and that can recreate the lockdep
>>>> splat 100% of the time. It goes away with this patch. Non-multipath
>>>> devices are harder to hit the lockdep splat for a different reason.
>>> I much prefer the srcu locking as it has real benefits as well over
>>> a global-ish rwsem.  I'll try to get to a real review in a bit.
>>>
>> Can you explain what are these benefits?
> No having a global lock taken for namespace lookups.

its a rw lock, not sure if its not a marginal value, especially given
the nature of sequences where we lookup ctrl namespaces.

I just want to have good testing before we touch these areas that
are all done in ctrl reset and error recovery which historically manifest
most of the issues...

and all this because lockdep complains on false-positives...

I'm not against addressing this, but we should be a bit more cautious...



More information about the Linux-nvme mailing list