From: Chuck Lever <cel@kernel.org>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
intel-gfx@lists.freedesktop.org, linux-afs@lists.infradead.org,
linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH 09/13] net: Convert sunrpc from pagevec to folio_batch
Date: Wed, 21 Jun 2023 13:50:28 -0400 [thread overview]
Message-ID: <ZJM4ZK8cKI4AmOgy@manet.1015granger.net> (raw)
In-Reply-To: <20230621164557.3510324-10-willy@infradead.org>
On Wed, Jun 21, 2023 at 05:45:53PM +0100, Matthew Wilcox (Oracle) wrote:
> Remove the last usage of pagevecs. There is a slight change here; we
> now free the folio_batch as soon as it fills up instead of freeing the
> folio_batch when we try to add a page to a full batch. This should have
> no effect in practice.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
I don't yet have visibility into the folio_batch_* helpers, but this
looks like a wholly mechanical replacement of pagevec. LGTM.
I assume this is going to be merged via another tree, not nfsd-next,
so:
Acked-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> include/linux/sunrpc/svc.h | 2 +-
> net/sunrpc/svc.c | 10 +++++-----
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
> index c2807e301790..f8751118c122 100644
> --- a/include/linux/sunrpc/svc.h
> +++ b/include/linux/sunrpc/svc.h
> @@ -222,7 +222,7 @@ struct svc_rqst {
> struct page * *rq_next_page; /* next reply page to use */
> struct page * *rq_page_end; /* one past the last page */
>
> - struct pagevec rq_pvec;
> + struct folio_batch rq_fbatch;
> struct kvec rq_vec[RPCSVC_MAXPAGES]; /* generally useful.. */
> struct bio_vec rq_bvec[RPCSVC_MAXPAGES];
>
> diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
> index e7c101290425..587811a002c9 100644
> --- a/net/sunrpc/svc.c
> +++ b/net/sunrpc/svc.c
> @@ -640,7 +640,7 @@ svc_rqst_alloc(struct svc_serv *serv, struct svc_pool *pool, int node)
> if (!rqstp)
> return rqstp;
>
> - pagevec_init(&rqstp->rq_pvec);
> + folio_batch_init(&rqstp->rq_fbatch);
>
> __set_bit(RQ_BUSY, &rqstp->rq_flags);
> rqstp->rq_server = serv;
> @@ -851,9 +851,9 @@ bool svc_rqst_replace_page(struct svc_rqst *rqstp, struct page *page)
> }
>
> if (*rqstp->rq_next_page) {
> - if (!pagevec_space(&rqstp->rq_pvec))
> - __pagevec_release(&rqstp->rq_pvec);
> - pagevec_add(&rqstp->rq_pvec, *rqstp->rq_next_page);
> + if (!folio_batch_add(&rqstp->rq_fbatch,
> + page_folio(*rqstp->rq_next_page)))
> + __folio_batch_release(&rqstp->rq_fbatch);
> }
>
> get_page(page);
> @@ -887,7 +887,7 @@ void svc_rqst_release_pages(struct svc_rqst *rqstp)
> void
> svc_rqst_free(struct svc_rqst *rqstp)
> {
> - pagevec_release(&rqstp->rq_pvec);
> + folio_batch_release(&rqstp->rq_fbatch);
> svc_release_buffer(rqstp);
> if (rqstp->rq_scratch_page)
> put_page(rqstp->rq_scratch_page);
> --
> 2.39.2
>
next prev parent reply other threads:[~2023-06-21 17:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 16:45 [PATCH 00/13] Remove pagevecs Matthew Wilcox (Oracle)
2023-06-21 16:45 ` [PATCH 01/13] afs: Convert pagevec to folio_batch in afs_extend_writeback() Matthew Wilcox (Oracle)
2023-06-21 16:45 ` [PATCH 02/13] mm: Add __folio_batch_release() Matthew Wilcox (Oracle)
2023-06-21 16:45 ` [PATCH 03/13] scatterlist: Add sg_set_folio() Matthew Wilcox (Oracle)
2023-07-30 11:01 ` Zhu Yanjun
2023-07-30 11:18 ` Matthew Wilcox
2023-07-30 13:57 ` Zhu Yanjun
2023-07-30 21:42 ` Matthew Wilcox
2023-08-18 7:05 ` Zhu Yanjun
2023-06-21 16:45 ` [PATCH 04/13] i915: Convert shmem_sg_free_table() to use a folio_batch Matthew Wilcox (Oracle)
2023-06-21 16:45 ` [PATCH 05/13] drm: Convert drm_gem_put_pages() " Matthew Wilcox (Oracle)
2023-06-21 16:45 ` [PATCH 06/13] mm: Remove check_move_unevictable_pages() Matthew Wilcox (Oracle)
2023-06-21 16:45 ` [PATCH 07/13] pagevec: Rename fbatch_count() Matthew Wilcox (Oracle)
2023-06-21 16:45 ` [PATCH 08/13] i915: Convert i915_gpu_error to use a folio_batch Matthew Wilcox (Oracle)
2023-06-21 16:45 ` [PATCH 09/13] net: Convert sunrpc from pagevec to folio_batch Matthew Wilcox (Oracle)
2023-06-21 17:50 ` Chuck Lever [this message]
2023-06-21 16:45 ` [PATCH 10/13] mm: Remove struct pagevec Matthew Wilcox (Oracle)
2023-06-21 16:45 ` [PATCH 11/13] mm: Rename invalidate_mapping_pagevec to mapping_try_invalidate Matthew Wilcox (Oracle)
2023-06-21 16:45 ` [PATCH 12/13] mm: Remove references to pagevec Matthew Wilcox (Oracle)
2023-06-21 16:45 ` [PATCH 13/13] mm: Remove unnecessary pagevec includes Matthew Wilcox (Oracle)
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=ZJM4ZK8cKI4AmOgy@manet.1015granger.net \
--to=cel@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=willy@infradead.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