From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7E47339863; Fri, 6 Mar 2026 11:45:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772797528; cv=none; b=kvhZgoXV4lwqldo0njf8aePZPPqmlyRTjGFDEQprpx+FctDrqmfZhAXLeoXSWK9p7Vcp0N1DTxZG90/Agj7WC++N2/kMnGQYIwzYwbKB4w/DKyWGSDAY/0qe1tiWTG6CRMnKYgKamEotVzpbIaeWT0RTxcoILKGqq6u6TMEfb+w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772797528; c=relaxed/simple; bh=R0Pw6Rvi1Mhd+owNp6fekaCHGfNY8HGW5Ezw3BximRg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NrIY+RWaGvHQZ174g2ZeF36YwVuHJQwoSZsM2WQMDlF+rdl5qknTiYiNlIKIrlDeMcle3KbvjHuaueUUAuX+Jq9KuUSWL8m9Sq8iVILNC60FZ4172D0Px4I1LuQ/RevjuPdmGjzuv4+hIF682IbWJGRE/UppS7O3DtCsfyrf37Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fSK/XAQL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fSK/XAQL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9A66C4CEF7; Fri, 6 Mar 2026 11:45:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772797528; bh=R0Pw6Rvi1Mhd+owNp6fekaCHGfNY8HGW5Ezw3BximRg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fSK/XAQLAWrXgjeiTk3XlTolP/BrZo51IJvpeJZGw2osWtvnYdKil+TQMDx8gWiRi WjuQV6ZeyS/m6ni5W9gNsA2w9RKNJwzanT8/GnfMrboUr9Gbo4aVh2Mn/o2+vlLsjv 4PWo7PC7OublPZdNgrtwgO4Z2w9v6j7fcHKxDxv09GvTy61OlC8iHrQfKGPJGqGONd M0ALOZf6QGWhuKnQcihp+k2WJXsFw4+ryjYEvUIiElVerrlDn/O4aKeIuaVu+rMseL zWWevBBNjgHPZpEgylrlPgorL36cHHh2UT5GUH7Mk8QSGuUi3c21N1pC1/msfyBSRQ 8CjN9YQXQSKGA== Date: Fri, 6 Mar 2026 11:45:24 +0000 From: "Lorenzo Stoakes (Oracle)" To: Tal Zussman Cc: David Howells , Marc Dionne , Jaegeuk Kim , Chao Yu , Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Baoquan He , Barry Song , Matthew Wilcox , Dan Williams , Jan Kara , Alexander Viro , Christian Brauner , Theodore Ts'o , Andreas Dilger , Paulo Alcantara , Trond Myklebust , Anna Schumaker , Mark Fasheh , Joel Becker , Joseph Qi , Steve French , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Bharath SM , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Chris Mason , David Sterba , Ilya Dryomov , Alex Markuze , Viacheslav Dubeyko , Andreas Gruenbacher , Muchun Song , Oscar Salvador , Ryusuke Konishi , "Darrick J. Wong" , Chuck Lever , Jeff Layton , NeilBrown , Olga Kornievskaia , Dai Ngo , Jason Gunthorpe , John Hubbard , Peter Xu , Johannes Weiner , Roman Gushchin , Shakeel Butt , Jann Horn , Pedro Falcato , Brendan Jackman , Zi Yan , Hugh Dickins , Baolin Wang , Axel Rasmussen , Yuanchu Xie , Wei Xu , Qi Zheng , linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev, linux-ext4@vger.kernel.org, netfs@lists.linux.dev, linux-nfs@vger.kernel.org, ocfs2-devel@lists.linux.dev, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, gfs2@lists.linux.dev, linux-nilfs@vger.kernel.org, linux-xfs@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH v2 4/4] folio_batch: Rename PAGEVEC_SIZE to FOLIO_BATCH_SIZE Message-ID: <56265c07-962d-4bfc-b332-17f04c97429e@lucifer.local> References: <20260225-pagevec_cleanup-v2-0-716868cc2d11@columbia.edu> <20260225-pagevec_cleanup-v2-4-716868cc2d11@columbia.edu> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260225-pagevec_cleanup-v2-4-716868cc2d11@columbia.edu> On Wed, Feb 25, 2026 at 06:44:28PM -0500, Tal Zussman wrote: > struct pagevec no longer exists. Rename the macro appropriately. > > Signed-off-by: Tal Zussman Nice thanks for this! LGTM, so: Reviewed-by: Lorenzo Stoakes (Oracle) > --- > fs/btrfs/extent_io.c | 4 ++-- > include/linux/folio_batch.h | 6 +++--- > include/linux/folio_queue.h | 6 +++--- > mm/shmem.c | 4 ++-- > mm/swap.c | 2 +- > mm/swap_state.c | 2 +- > mm/truncate.c | 6 +++--- > 7 files changed, 15 insertions(+), 15 deletions(-) > > diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c > index c373d113f1e7..d82ca509503f 100644 > --- a/fs/btrfs/extent_io.c > +++ b/fs/btrfs/extent_io.c > @@ -2095,13 +2095,13 @@ static void buffer_tree_tag_for_writeback(struct btrfs_fs_info *fs_info, > struct eb_batch { > unsigned int nr; > unsigned int cur; > - struct extent_buffer *ebs[PAGEVEC_SIZE]; > + struct extent_buffer *ebs[FOLIO_BATCH_SIZE]; > }; > > static inline bool eb_batch_add(struct eb_batch *batch, struct extent_buffer *eb) > { > batch->ebs[batch->nr++] = eb; > - return (batch->nr < PAGEVEC_SIZE); > + return (batch->nr < FOLIO_BATCH_SIZE); > } > > static inline void eb_batch_init(struct eb_batch *batch) > diff --git a/include/linux/folio_batch.h b/include/linux/folio_batch.h > index a2f3d3043f7e..b45946adc50b 100644 > --- a/include/linux/folio_batch.h > +++ b/include/linux/folio_batch.h > @@ -12,7 +12,7 @@ > #include > > /* 31 pointers + header align the folio_batch structure to a power of two */ > -#define PAGEVEC_SIZE 31 > +#define FOLIO_BATCH_SIZE 31 > > struct folio; > > @@ -29,7 +29,7 @@ struct folio_batch { > unsigned char nr; > unsigned char i; > bool percpu_pvec_drained; > - struct folio *folios[PAGEVEC_SIZE]; > + struct folio *folios[FOLIO_BATCH_SIZE]; > }; > > /** > @@ -58,7 +58,7 @@ static inline unsigned int folio_batch_count(const struct folio_batch *fbatch) > > static inline unsigned int folio_batch_space(const struct folio_batch *fbatch) > { > - return PAGEVEC_SIZE - fbatch->nr; > + return FOLIO_BATCH_SIZE - fbatch->nr; > } > > /** > diff --git a/include/linux/folio_queue.h b/include/linux/folio_queue.h > index 0d3765fa9d1d..f6d5f1f127c9 100644 > --- a/include/linux/folio_queue.h > +++ b/include/linux/folio_queue.h > @@ -29,12 +29,12 @@ > */ > struct folio_queue { > struct folio_batch vec; /* Folios in the queue segment */ > - u8 orders[PAGEVEC_SIZE]; /* Order of each folio */ > + u8 orders[FOLIO_BATCH_SIZE]; /* Order of each folio */ > struct folio_queue *next; /* Next queue segment or NULL */ > struct folio_queue *prev; /* Previous queue segment of NULL */ > unsigned long marks; /* 1-bit mark per folio */ > unsigned long marks2; /* Second 1-bit mark per folio */ > -#if PAGEVEC_SIZE > BITS_PER_LONG > +#if FOLIO_BATCH_SIZE > BITS_PER_LONG > #error marks is not big enough > #endif > unsigned int rreq_id; > @@ -70,7 +70,7 @@ static inline void folioq_init(struct folio_queue *folioq, unsigned int rreq_id) > */ > static inline unsigned int folioq_nr_slots(const struct folio_queue *folioq) > { > - return PAGEVEC_SIZE; > + return FOLIO_BATCH_SIZE; > } > > /** > diff --git a/mm/shmem.c b/mm/shmem.c > index 149fdb051170..5e7dcf5bc5d3 100644 > --- a/mm/shmem.c > +++ b/mm/shmem.c > @@ -1113,7 +1113,7 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, uoff_t lend, > pgoff_t start = (lstart + PAGE_SIZE - 1) >> PAGE_SHIFT; > pgoff_t end = (lend + 1) >> PAGE_SHIFT; > struct folio_batch fbatch; > - pgoff_t indices[PAGEVEC_SIZE]; > + pgoff_t indices[FOLIO_BATCH_SIZE]; > struct folio *folio; > bool same_folio; > long nr_swaps_freed = 0; > @@ -1510,7 +1510,7 @@ static int shmem_unuse_inode(struct inode *inode, unsigned int type) > struct address_space *mapping = inode->i_mapping; > pgoff_t start = 0; > struct folio_batch fbatch; > - pgoff_t indices[PAGEVEC_SIZE]; > + pgoff_t indices[FOLIO_BATCH_SIZE]; > int ret = 0; > > do { > diff --git a/mm/swap.c b/mm/swap.c > index 2e517ede6561..78b4aa811fc6 100644 > --- a/mm/swap.c > +++ b/mm/swap.c > @@ -1018,7 +1018,7 @@ EXPORT_SYMBOL(folios_put_refs); > void release_pages(release_pages_arg arg, int nr) > { > struct folio_batch fbatch; > - int refs[PAGEVEC_SIZE]; > + int refs[FOLIO_BATCH_SIZE]; > struct encoded_page **encoded = arg.encoded_pages; > int i; > > diff --git a/mm/swap_state.c b/mm/swap_state.c > index a0c64db2b275..6313b59d7eab 100644 > --- a/mm/swap_state.c > +++ b/mm/swap_state.c > @@ -385,7 +385,7 @@ void free_folio_and_swap_cache(struct folio *folio) > void free_pages_and_swap_cache(struct encoded_page **pages, int nr) > { > struct folio_batch folios; > - unsigned int refs[PAGEVEC_SIZE]; > + unsigned int refs[FOLIO_BATCH_SIZE]; > > folio_batch_init(&folios); > for (int i = 0; i < nr; i++) { > diff --git a/mm/truncate.c b/mm/truncate.c > index df0b7a7e6aff..2931d66c16d0 100644 > --- a/mm/truncate.c > +++ b/mm/truncate.c > @@ -369,7 +369,7 @@ void truncate_inode_pages_range(struct address_space *mapping, > pgoff_t start; /* inclusive */ > pgoff_t end; /* exclusive */ > struct folio_batch fbatch; > - pgoff_t indices[PAGEVEC_SIZE]; > + pgoff_t indices[FOLIO_BATCH_SIZE]; > pgoff_t index; > int i; > struct folio *folio; > @@ -534,7 +534,7 @@ EXPORT_SYMBOL(truncate_inode_pages_final); > unsigned long mapping_try_invalidate(struct address_space *mapping, > pgoff_t start, pgoff_t end, unsigned long *nr_failed) > { > - pgoff_t indices[PAGEVEC_SIZE]; > + pgoff_t indices[FOLIO_BATCH_SIZE]; > struct folio_batch fbatch; > pgoff_t index = start; > unsigned long ret; > @@ -672,7 +672,7 @@ int folio_unmap_invalidate(struct address_space *mapping, struct folio *folio, > int invalidate_inode_pages2_range(struct address_space *mapping, > pgoff_t start, pgoff_t end) > { > - pgoff_t indices[PAGEVEC_SIZE]; > + pgoff_t indices[FOLIO_BATCH_SIZE]; > struct folio_batch fbatch; > pgoff_t index; > int i; > > -- > 2.39.5 >