[openib-general] on calling rdma_disconnect from non sleepablecontext

Or Gerlitz ogerlitz at voltaire.com
Wed Feb 1 22:13:26 PST 2006


Roland Dreier wrote:
> Yes, the modify QP operation might sleep.  For example, on Mellanox
> hardware, modifying a QP requires a firmware command, which allocates
> a mailbox with GFP_KERNEL and also sleeps until the command completes.

Can you elaborate a little more on the "---might-- sleep" with regard to 
the Mellanox hardware/firmware? empirically i saw (and could not 
understand) that on 99% of the cases where my code called ib_modify_qp 
(via rdma_disconnect) and ib_destory_qp (directly) from non sleepable 
context (tasklet) it just worked fine.

AFAIK since the mthca driver works in "events" command mode, it would 
always sleep after issuing a command to the FW till the command 
completion is reported to the commands EQ and then there's a wakeup.

> I tried to document these sorts of rules in Documentation/infiniband/core_locking.txt

Sure, the documentation does not state that modify qp is among those 
verbs who may be called from non sleepable context which is enough, and 
the CMA does modify QP before it send the DREQ so rdma_disconnect is 
also not allowed to be called from such context.

Or.







More information about the general mailing list