RE: [PATCH RESEND for-next 5/9] IB/{rdmavt, qib, hfi1}: Use new routine to release reference counts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>-----Original Message-----
>From: Jason Gunthorpe [mailto:jgg@xxxxxxxx]
>Sent: Tuesday, April 16, 2019 11:20 PM
>To: Ruhl, Michael J <michael.j.ruhl@xxxxxxxxx>
>Cc: Leon Romanovsky <leon@xxxxxxxxxx>; Dalessandro, Dennis
><dennis.dalessandro@xxxxxxxxx>; dledford@xxxxxxxxxx; linux-
>rdma@xxxxxxxxxxxxxxx; Marciniszyn, Mike <mike.marciniszyn@xxxxxxxxx>
>Subject: Re: [PATCH RESEND for-next 5/9] IB/{rdmavt, qib, hfi1}: Use new
>routine to release reference counts
>
>On Mon, Apr 15, 2019 at 08:52:52PM +0000, Ruhl, Michael J wrote:
>
>> We do need the reference count because the AH is used by the
>asynchronous
>> send engine.
>
>Drivers cannot use refcounts to manage their object lifetimes. Destroy
>must be synchronous.

I think that that is what we are trying to address (make destroy synchronous).

>So if you have AH's in use by another thread it must sleep during
>destroy..

What must sleep, the other thread or the destroy?

>> I am going to work up a patch to implement the SLEEPABLE path in our destroy
>> to deal with this.
>
>I thought that was only for create? Did we get an expectation that
>destroy is non-sleeping? I hope not..

Umm.  The _destroy() interface has a destroy_flags parameter.

My assumption for this is that if RDMA_DESTROY_AH_SLEEPABLE is set,
the drivers _destroy() function must wait (sleep?) until all access (our internal refcount)
to the AH is compete.

Are you saying this mechanism is for the _create only?

Thanks,

Mike

>Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux