From: Pranjal Shrivastava <praan@google.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>,
linux-nfs@vger.kernel.org, Chuck Lever <cel@kernel.org>,
Jeff Layton <jlayton@kernel.org>,
linux-kernel@vger.kernel.org,
Logan Gunthorpe <logang@deltatee.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
linux-pci@vger.kernel.org, linux-rdma@vger.kernel.org,
Shivaji Kant <shivajikant@google.com>
Subject: Re: [PATCH v3 3/5] nfs: Introduce nfs_release_request_list helper
Date: Mon, 20 Jul 2026 14:24:49 +0000 [thread overview]
Message-ID: <al4vsf9ELpS9-4ed@google.com> (raw)
In-Reply-To: <20260720091505.GC24298@lst.de>
On Mon, Jul 20, 2026 at 11:15:05AM +0200, Christoph Hellwig wrote:
> On Wed, Jul 15, 2026 at 02:35:38PM +0000, Pranjal Shrivastava wrote:
> > Introduce a centralized helper, nfs_release_request_list, to handle
> > the bulk release of nfs_page requests from a list.
> >
> > This serves as a preparatory step for two upcoming improvements:
> >
> > 1. Pin-Aware Cleanup: As we migrate to iov_iter_extract_* API,
> > requests will hold pins (GUP) instead of standard references. The
> > helper ensures that the correct unpinning logic gets applied
> > consistently across all requests in a list.
> >
> > 2. Folio Support: In subsequent patches where nfs_page structures
> > will cover multi-page folios, this helper provides a clean
> > infrastructure to unlock these larger units of I/O in bulk during
> > completion, similat to the pattern in bio_release_pages.
> >
> > Additionally, refactor nfs_read_sync_pgio_error() to utilize this new
> > helper.
> >
[...]
> > +/*
> > + * nfs_release_request_list - Release a list of NFS read/write requests
> > + * @head: list of requests to release
> > + *
> > + * Removes each request from the list and drops it's refcount.
> > + */
> > +void nfs_release_request_list(struct list_head *head)
> > +{
> > + struct nfs_page *req;
> > +
> > + while (!list_empty(head)) {
> > + req = nfs_list_entry(head->next);
>
> req could/should be local here. Or you switch to list_first_or_null,
> which some folks prefer.
>
Ack. Made it local
> > +extern void nfs_release_request(struct nfs_page *req);
> > +extern void nfs_release_request_list(struct list_head *head);
>
> Please drop the superflous externs for new code.
>
Ack. Dropping the externs.
Thanks,
Praan
next prev parent reply other threads:[~2026-07-20 14:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 14:35 [PATCH v3 0/5] nfs: Modernize Direct I/O path Pranjal Shrivastava
2026-07-15 14:35 ` [PATCH v3 1/5] nfs: make nfs_page pin-aware Pranjal Shrivastava
2026-07-20 9:13 ` Christoph Hellwig
2026-07-20 13:52 ` Pranjal Shrivastava
2026-07-15 14:35 ` [PATCH v3 2/5] nfs: Track number of pinned pages in nfs_page Pranjal Shrivastava
2026-07-20 9:14 ` Christoph Hellwig
2026-07-20 14:05 ` Pranjal Shrivastava
2026-07-15 14:35 ` [PATCH v3 3/5] nfs: Introduce nfs_release_request_list helper Pranjal Shrivastava
2026-07-20 9:15 ` Christoph Hellwig
2026-07-20 9:58 ` Shivaji Kant
2026-07-20 15:03 ` Pranjal Shrivastava
2026-07-20 14:24 ` Pranjal Shrivastava [this message]
2026-07-15 14:35 ` [PATCH v3 4/5] nfs: migrate direct I/O to iov_iter_extract_pages Pranjal Shrivastava
2026-07-20 9:15 ` Christoph Hellwig
2026-07-15 14:35 ` [PATCH v3 5/5] nfs: introduce nfs_direct_extract_pages helper Pranjal Shrivastava
2026-07-20 9:15 ` Christoph Hellwig
2026-07-20 10:17 ` Shivaji Kant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=al4vsf9ELpS9-4ed@google.com \
--to=praan@google.com \
--cc=anna@kernel.org \
--cc=cel@kernel.org \
--cc=hch@lst.de \
--cc=jgg@ziepe.ca \
--cc=jlayton@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=shivajikant@google.com \
--cc=trondmy@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox