On Sat, Jul 06, 2024 at 10:32:52AM +1000, NeilBrown wrote: > Would it be reasonable for the partial pages to be written over RPC and > for only full pages to be sent directly to the server-side file using > O_DIRECT writes? Presumably the benefits of localio are most pronounced > with large writes which will mostly be full-page, or even full-folio. Yes. Note that we already have infrastructure to always read the entire page for pnfs block (PNFS_READ_WHOLE_PAGE / pnfs_ld_read_whole_page) to make this a lot more common at least for reads. > O_DIRECT writes on the NFS side would be more awkward. open(2) > documents that NFS places no alignment restrictions on O_DIRECT I/O. If > applications depend on that then some copying will have to be done > before the data is written to a block filesystem - possibly into the > page cache, possibly into some other buffer. This wouldn't be more > copying that we already do. Yes. There is precedence for that in pNFS as well: fs/nfs/blocklayout/blocklayout.c:is_aligned_req().