RE: [PATCH rdma-next 5/6] RDMA/{cma, core}: Avoid callback on rdma_addr_cancel()

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

 



Hi Sean,

> -----Original Message-----
> From: Hefty, Sean <sean.hefty@xxxxxxxxx>
> Sent: Tuesday, August 28, 2018 12:21 PM
> To: Leon Romanovsky <leon@xxxxxxxxxx>; Doug Ledford
> <dledford@xxxxxxxxxx>; Jason Gunthorpe <jgg@xxxxxxxxxxxx>
> Cc: Leon Romanovsky <leonro@xxxxxxxxxxxx>; RDMA mailing list <linux-
> rdma@xxxxxxxxxxxxxxx>; Daniel Jurgens <danielj@xxxxxxxxxxxx>; Feras Daoud
> <ferasda@xxxxxxxxxxxx>; Maor Gottlieb <maorg@xxxxxxxxxxxx>;
> Muhammad Sammar <muhammads@xxxxxxxxxxxx>; Parav Pandit
> <parav@xxxxxxxxxxxx>
> Subject: RE: [PATCH rdma-next 5/6] RDMA/{cma, core}: Avoid callback on
> rdma_addr_cancel()
> 
> > Currently rdma_addr_cancel() is an async operation, which notifies
> > that cancel is done by executing the callback function given during
> > rdma_resolve_ip(). If resolve_ip request is already completed than
> > callback is not executed.
> >
> > Instead, now rdma_resolve_addr() and rdma_addr_cancel() simplified in
> > following ways.
> > 1. rdma_addr_cancel() now a synchronous method. If request was
> > pending, after it is cancelled, no callback is notified.
> 
> There's no way for a caller to know if a callback will be invoked or not after
> rdma_addr_cancel() returns.  
Caller doesn't need to know if a callback will be invoked or not after rdma_addr_cancel() returns.
Because once rdma_addr_cancel() returns, 
Either
(a) callback execution is finished
Or
(b) callback will not be executed, (because request was cancelled)

A callback could already be in progress (but not yet
> hit the caller's code) when they call cancel.
When a call is getting cancelled, if callback is already in progress, 
rdma_addr_cancel() waits for the callback to get completed by performing cancel_delayed_work_sync().
If callback in parallel thread has finished executing callback by addr wq, than addr_cancel() doesn't need to do anything other than cleanup that it does today (list_del(), kfree() etc)

Did I understand your comment? Or a race condition exist that I don't yet see?





[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