Re: [PATCH 4/9] srpt: chain RDMA READ/WRITE requests

2015-11-20 Thread Christoph Hellwig
On Wed, Nov 18, 2015 at 08:32:59AM -0800, Bart Van Assche wrote: > As you know events like a cable pull can cause some of the RDMA work > requests to succeed and others to fail. It is essential that all RDMA work > requests related to the same SCSI command have finished before the buffers >

Re: [PATCH 4/9] srpt: chain RDMA READ/WRITE requests

2015-11-18 Thread Bart Van Assche
On 11/18/2015 01:15 AM, Sagi Grimberg wrote: On 18/11/2015 03:17, Bart Van Assche wrote: On 11/13/2015 05:46 AM, Christoph Hellwig wrote: -ret = ib_post_send(ch->qp, , _wr); -if (ret) -break; +if (i == n_rdma - 1) { +/* only get completion event

Re: [PATCH 4/9] srpt: chain RDMA READ/WRITE requests

2015-11-18 Thread Sagi Grimberg
On 18/11/2015 03:17, Bart Van Assche wrote: On 11/13/2015 05:46 AM, Christoph Hellwig wrote: -ret = ib_post_send(ch->qp, , _wr); -if (ret) -break; +if (i == n_rdma - 1) { +/* only get completion event for the last rdma read */ +if

Re: [PATCH 4/9] srpt: chain RDMA READ/WRITE requests

2015-11-18 Thread Christoph Hellwig
On Tue, Nov 17, 2015 at 05:17:35PM -0800, Bart Van Assche wrote: > Chaining RDMA requests is a great idea. But it seems to me that this patch > is based on the assumption that posting multiple RDMA requests either > succeeds as a whole or fails as a whole. Sorry but I'm not sure that the >

Re: [PATCH 4/9] srpt: chain RDMA READ/WRITE requests

2015-11-17 Thread Bart Van Assche
On 11/13/2015 05:46 AM, Christoph Hellwig wrote: - ret = ib_post_send(ch->qp, , _wr); - if (ret) - break; + if (i == n_rdma - 1) { + /* only get completion event for the last rdma read */ +

[PATCH 4/9] srpt: chain RDMA READ/WRITE requests

2015-11-13 Thread Christoph Hellwig
Remove struct rdma_iu and instead allocate the struct ib_rdma_wr array early and fill out directly. This allows us to chain the WRs, and thus archive both less lock contention on the HCA workqueue as well as much simpler error handling. Signed-off-by: Christoph Hellwig ---