linux-nfs / nfsd

Linux kernel source tree
Other
0 stars 0 forks source link

Handle bio_vecs natively in svcrdma #53

Open chucklever opened 5 months ago

chucklever commented 5 months ago

In recent kernels, the socket APIs have grown the capability to pass large amounts of data, including pages via zero copy, using a single bio_vec iterator. NFSD's socket transport implementations have been able to take advantage of this new capability.

NFSD's RDMA transport implementation has not been updated because, at this time, neither the kernel's IOMMU APIs nor its RDMA APIs have a variant that uses bio_vec iterators. These APIs do currently implement SGLs, but the IOMMU folks say that the SGL support is really syntactic sugar over a page array, and is neither efficient nor pretty.

We would like to replace the pages array in "struct xdr_buf" with a bio_vec iterator, since the upper layer (eg NFS) could populate this and it wouldn't have to be touched all the way to the device driver. At least that would be the case today for the socket transports. But the RDMA transport would have to convert that iterator back into SGEs.

The long term plan is to build native support for bio_vec iterators into the IOMMU layer, then into the RDMA core. At that point we can re-implement svcrdma to use bio_vec iterators as well, and the rest of the stack (on up through NFS) can be converted.