On Fri, 2017-05-05 at 10:53 +0200, Christoph Hellwig wrote: > On Thu, May 04, 2017 at 03:50:46PM -0700, Bart Van Assche wrote: > > For several target drivers (e.g. ib_srpt and ib_isert) sleeping inside > > transport_generic_free_cmd() causes RDMA completion processing to stall. > > Hence only sleep inside this function if the (iSCSI) target driver > > requires this. > > This looks reasonable to me: > > Reviewed-by: Christoph Hellwig > > But as a further step can we try to move the waiting behavior entirely > into the caller that actually cares, > > e.g. move the conditional target_wait_free_cmd before the call > to transport_generic_free_cmd in transport_generic_free_cmd, > and move this second wait_for_completion after the > transport_generic_free_cmd call based on an indicator (return value > or se_cmd flag)? Hello Christoph, I have started working on eliminating the waiting code from transport_generic_free_cmd(). I'm still working on a patch for the iSCSI target driver. What I came up so far for the loop and Xen scsiback drivers is attached to this e-mail. Bart.