Subject: Re: [RFC PATCH 3/4] nfs: make nfs_page pin-aware

From: Pranjal Shrivastava <[email-masked]>
Date: Tue, 14 Apr 2026 19:58:13 +0000

On Wed, Apr 01, 2026 at 10:04:23PM -0700, Christoph Hellwig wrote:
> This conversion really should go first as it is badly needed independent
> of any P2P support.  And I wonder if it should go further - currently
> the NFS I/O code is using folios for buffered I/O, but pages for direct
> I/O, which makes larger I/O very inefficient.
> 

Ack. I'll send this out as a different series with migration to folios
for direct I/O as well.

> The iov_iter_extract_bvecs wrapper allows to extract bvecs instead, which
> might be a good choice here either by passing down the bvecs or
> converting to an nfs_page inline.  Or just open coding a variant of
> iov_iter_extract_bvecs that converts to nfs_page structures instead of
> bvecs.  This would pair with a helper similar to __bio_release_pages on
> the unlock side.

Ack. I'll attempt an open coded variant.

> 
> > +			req = nfs_page_create_from_page(dreq->ctx, pagevec[i], false,
> >  							pgbase, pos, req_len);
> >
> 
> A lot of this code reads pretty odd as it's overflowing the lines.
> 

Ahh, my bad. For some reason even checkpatch didn't catch this, I'll fix
this here and everywhere else.

Thanks,
Praan