linux-nfs / nfsd

Linux kernel source tree
Other
0 stars 0 forks source link

Direct NFSD support for folios #40

Open chucklever opened 7 months ago

chucklever commented 7 months ago

NFSD currently uses struct page throughout. It needs to be converted to use folios, as that is the direction the page cache API is moving. I'm told this is mainly a mechanical/code-editing change.

To support "large folios" -- folios that represent more than one page, more significant surgery will be needed. That will be the next step.

chucklever commented 6 months ago

It's not clear what "support for single-page folios" means. The big consumer of single pages in NFSD is the rq_pages array, which is an RPC layer object. So we may need to do the bio_vec conversion in the RPC layer first before moving on to folio support in NFSD.

chucklever commented 6 months ago

I'm moving this to unscoped until the RPC layer work has been done and we have a better idea what needs to happen here.

chucklever commented 2 months ago

The underlying VFS read (via both the splice and iter APIs) and write paths handle folios transparently. There is nothing to do there today to enable NFSD to work with foliated local file systems.

However, we'd like to expose folios directly to the RPC server code so that folio content can be transferred more efficiently into RPC buffers. For instance, a folio read from the local file system can be presented directly to a network transport (eg a socket endpoint) as a bvec array, and maybe that can be done without the page-at-a-time mechanism in nfsd_splice_actor().