Re: linux rdma 3.14 merge plans

Bart Van Assche
2014-01-29T14:13:21Z

On 01/28/14 22:02, Or Gerlitz wrote:
>>>> Roland, ping! the signature patches were posted > three months ago.

I have a question about RDMA and T10-DIF support. The Linux block layer,
the Linux SCSI core, Linux filesystems and block drivers all support
discontiguous buffers. These are buffers that cannot be mapped onto a
single contiguous range of virtual memory addresses. I think the RDMA
FMR and FR memory registration mechanisms only support mapping a range
of addresses that can be mapped onto a contiguous region of virtual
addresses. This means that either multiple RDMA memory regions are
needed to map a discontiguous buffer or that the buffer contents has to
be copied before associating it with a memory region. What I understood
from the mlx5 T10-DIF patch series is that the API introduced in that
patch series is such that only a single memory region per data transfer
operation is supported. This made me wonder how to support T10-DIF for
discontiguous buffers. Would one of the options below perhaps be an
appropriate solution ?
- Add a flag in struct request_queue that tells the block layer to use a
bounce buffer (data copying) for I/O requests with a discontiguous
data buffer. The block layer already supports copying data buffers for
which e.g. DMA alignment requirements are not met. Rework patch
"IB/iser: Introduce fast memory registration model" (commit
5587856c9659ac2d6ab201141aa8a5c2ff3be4cd) such that it takes advantage
of that new flag. See also blk_rq_map_user_iov() for an example of
how the block layer decides when copying a data buffer is necessary.
- Modify the patches that add T10-DIF such that discontiguous buffers
are supported.

Sorry that I had not realized this before.

Bart.