Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1272009 > unrolled thread
| Started by | Sagi Grimberg <sagig@dev.mellanox.co.il> |
|---|---|
| First post | 2015-11-18 10:20 +0100 |
| Last post | 2015-11-20 11:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 4/9] srpt: chain RDMA READ/WRITE requests Sagi Grimberg <sagig@dev.mellanox.co.il> - 2015-11-18 10:20 +0100
Re: [PATCH 4/9] srpt: chain RDMA READ/WRITE requests Christoph Hellwig <hch@lst.de> - 2015-11-20 11:30 +0100
| From | Sagi Grimberg <sagig@dev.mellanox.co.il> |
|---|---|
| Date | 2015-11-18 10:20 +0100 |
| Subject | Re: [PATCH 4/9] srpt: chain RDMA READ/WRITE requests |
| Message-ID | <qw74d-WO-11@gated-at.bofh.it> |
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.wr, &bad_wr);
>> - if (ret)
>> - break;
>> + if (i == n_rdma - 1) {
>> + /* only get completion event for the last rdma read */
>> + if (dir == DMA_TO_DEVICE)
>> + wr->wr.send_flags = IB_SEND_SIGNALED;
>> + wr->wr.next = NULL;
>> + } else {
>> + wr->wr.next = &ioctx->rdma_ius[i + 1].wr;
>> + }
>> }
>>
>> + ret = ib_post_send(ch->qp, &ioctx->rdma_ius->wr, &bad_wr);
>> if (ret)
>> pr_err("%s[%d]: ib_post_send() returned %d for %d/%d\n",
>> __func__, __LINE__, ret, i, n_rdma);
>
> Hello Christoph,
Hi Bart,
>
> 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 verbs API guarantees this. In the ib_srpt driver a QP can be
> changed at any time into the error state and there might be drivers that
> report an immediate failure in that case.
I'm not so sure it actually matters if some WRs succeeded. In the normal
flow when srpt has enough available work requests (sq_wr_avail) they
should all succeed otherwise we're in trouble. If the QP transitioned
to ERROR state, then some failed, but those that succeeded will
generate flush completions, and srpt should handle it correctly
shouldn't it?
> I think even when chaining
> RDMA requests that we still need a mechanism to wait until ongoing RDMA
> transfers have finished if some but not all RDMA requests have been posted.
I'm not an expert on srpt, can you explain how this mechanism will help?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Date | 2015-11-20 11:30 +0100 |
| Message-ID | <qwR75-5WC-35@gated-at.bofh.it> |
| In reply to | #1272009 |
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 > these requests operate upon are reused. The purpose of the SRPT_RDMA_ABORT > request is to wait for the RDMA requests that were posted without > IB_SEND_SIGNALED and for which no error completion will be received. BTW, I > think this consideration applies to all SCSI target drivers and not only to > SRP target drivers. I think everyone understand the theroetical issue, but we'd like to see a practical case that the implementation in isert and my proposed srpt one don't handle. Given that chained WRs must not be reordered the HCA must also give us the completions in the order we submitted them. Because of that the previous WRs must have been completed by the time we get the notification for the last one which usually does the cleanup. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web