From nobody Tue Apr 7 15:29:54 2026 Received: from mx0a-00364e01.pphosted.com (mx0a-00364e01.pphosted.com [148.163.135.74]) (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 F3F2A3876A5 for ; Wed, 25 Feb 2026 23:44:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772063095; cv=none; b=OuSUk2kBRxGaOZNcUS5Smr8HuNdqdnjPEqx+9o2NB+62USCvYlgdHd+lzciH1sqass59cd0b1cYiUK3rb4w6XJJzA3oM12sW7iyPqjPQwHtc4qtBtgs67K1DXCgHC0Z9HxM6iz00vIOWfaomxXfKIhrHkBMLWqefzK7Nie37AK0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772063095; c=relaxed/simple; bh=zO7GBjiuOn5Q+h+zA8UgP1+Klsw8MQQTt1O0svxg4WA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pGGlSwZcaGMULI91d6VKi5Hq7lubx6lHGsl7gcRahan2p8aUfryoyMJ3jcRISh0OVdzMaNf14qrRHe/xm85H0AliGN+8acmP++fPlfAjAUG57J1FPJAcFa9OMpWIwO/I/AVK8DDZfO+tQ3dhVpaf7dsTK7EFM2iY02hmxxF5G2E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=columbia.edu; spf=pass smtp.mailfrom=columbia.edu; dkim=pass (2048-bit key) header.d=columbia.edu header.i=@columbia.edu header.b=b/yB3FO8; arc=none smtp.client-ip=148.163.135.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=columbia.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=columbia.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=columbia.edu header.i=@columbia.edu header.b="b/yB3FO8" Received: from pps.filterd (m0167068.ppops.net [127.0.0.1]) by mx0a-00364e01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61PNN4DD3928295 for ; Wed, 25 Feb 2026 18:44:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=columbia.edu; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pps01; bh=TE8Z hYBQf9fiNswnOLiD0snqyySTRxN7Ufk+GD8fw6E=; b=b/yB3FO8kwgXmET281Jv XP+tAXlRZIOQ6OAFR2YSS+792EIr83nP+nakYz8tKWh86IL9kbOyLkg2yn8b3g/q S5VPNh8sAcmAlprkg2Cw/wyQbawj3NLSALIkGLq2K8V4kIRt4aYXHS/DHlGsM8fs H8cCC3+JhbwQsrjnzdcgeRxONcJg4TG6TN/qWF72MSX7O8ZGhKSU3I2BfZEDoisK t1LvqQr0puhEkmBwjqopiEjNDjB9vH7tXsjnfmo+oQfclWfz01qggxeWH6r8fgsq rZ0/3X3DzNuyvGFcD+vq2Q7XNExoHO+FQm1lfYBwrgA16DwNSuwMZae97gH/dVl+ jg== Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-00364e01.pphosted.com (PPS) with ESMTPS id 4chn9y0f0x-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 25 Feb 2026 18:44:51 -0500 (EST) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-50336ebabe0so119035651cf.1 for ; Wed, 25 Feb 2026 15:44:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772063090; x=1772667890; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id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ELtjJ1WVxBGJ2d2TTQ60HXVJiYOK2 QqmMr2KuhEvFQKwBIR8PhB1kew+VcnbbX X-Received: by 2002:ac8:5ac5:0:b0:503:2fe5:f380 with SMTP id d75a77b69052e-507441df64fmr13262641cf.0.1772063089927; Wed, 25 Feb 2026 15:44:49 -0800 (PST) X-Received: by 2002:ac8:5ac5:0:b0:503:2fe5:f380 with SMTP id d75a77b69052e-507441df64fmr13262341cf.0.1772063089401; Wed, 25 Feb 2026 15:44:49 -0800 (PST) Received: from [127.0.1.1] ([216.158.158.246]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-899c738d80bsm3357606d6.41.2026.02.25.15.44.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Feb 2026 15:44:49 -0800 (PST) From: Tal Zussman Date: Wed, 25 Feb 2026 18:44:28 -0500 Subject: [PATCH v2 4/4] folio_batch: Rename PAGEVEC_SIZE to FOLIO_BATCH_SIZE 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260225-pagevec_cleanup-v2-4-716868cc2d11@columbia.edu> References: <20260225-pagevec_cleanup-v2-0-716868cc2d11@columbia.edu> In-Reply-To: <20260225-pagevec_cleanup-v2-0-716868cc2d11@columbia.edu> To: 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 Cc: 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, Tal Zussman X-Mailer: b4 0.14.3-dev-d7477 X-Developer-Signature: v=1; a=ed25519-sha256; t=1772063077; l=5814; i=tz2294@columbia.edu; s=20250528; h=from:subject:message-id; bh=zO7GBjiuOn5Q+h+zA8UgP1+Klsw8MQQTt1O0svxg4WA=; b=KCL19WgRUDAqH63IGvAc3KncLR0mQnluCE5DMTx+wx8s1EMvm5gWiID7it4982lNgTaHXaECH ClIpdW+IjPxAETpUADJ+80YGkvu3AQ4uNneZg/M0Lj8/3I89nOh73yK X-Developer-Key: i=tz2294@columbia.edu; a=ed25519; pk=BIj5KdACscEOyAC0oIkeZqLB3L94fzBnDccEooxeM5Y= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjI1MDIyNyBTYWx0ZWRfX/PS6ARm3siyp lWSckzmIxNBUhnHSVF7nCkR0fdpNJIa5RWrIjxDFUMhnNLExDDJ7dwjYKVX3yIldL4SmARLsPQa LjWS9Iq9GF2nFmOngzOqc2vjBB+2LsPS9I9YKINaebsYcdvFU7DhAbazu/Cb6FKgNVC75QfBvmD JgfM9s8Pj7Oky8QNoWRJ5kzXDk4Yqe8WDKKlJutfYJIvm5qcUHAG7qN+OQmqmxPXA9IOm2OPdPy 5vwUPJ0Pxlxm2RtoxhVtdetqSY7L4U5GS5PQx2Zt/ZpZxI1Fp5ZJMIjgCxIYU3aKmTU4jec5ohZ IDNX3xGkKI0TD+GSm4Ajn+WMkV/bsebzTDftPHUKplQssrLirQmhitFidWI7WVUF0px+Uw/8I1v xBqgG2fv2hiBVZXg+MGgyqbRq9u/yul8n/K3u8EDREqKSFj6SV3mhd/7LmC0vTqfkxkcfsHOksC p3+xj0MT00UWTEhHLbQ== X-Proofpoint-GUID: 1WNeWo3wh8EEF5ZlBCortuQac55dMCGV X-Authority-Analysis: v=2.4 cv=DvVbOW/+ c=1 sm=1 tr=0 ts=699f8973 cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=mD05b5UW6KhLIDvowZ5dSQ==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=x7bEGLp0ZPQA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Da8U98TiO7q1upZEImrf:22 a=usPcmh10W0ubT8QP8_c3:22 a=960X5KZuJcz03JLduyoA:9 a=QEXdDO2ut3YA:10 a=a_PwQJl-kcHnX1M80qC6:22 X-Proofpoint-ORIG-GUID: 1WNeWo3wh8EEF5ZlBCortuQac55dMCGV X-Proofpoint-Virus-Version: vendor=nai engine=6800 definitions=11712 signatures=596818 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=10 impostorscore=10 malwarescore=0 adultscore=0 lowpriorityscore=10 phishscore=0 clxscore=1015 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2602250227 struct pagevec no longer exists. Rename the macro appropriately. Signed-off-by: Tal Zussman Acked-by: David Hildenbrand (Arm) Acked-by: Zi Yan Reviewed-by: Jan Kara 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 bt= rfs_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]; }; =20 static inline bool eb_batch_add(struct eb_batch *batch, struct extent_buff= er *eb) { batch->ebs[batch->nr++] =3D eb; - return (batch->nr < PAGEVEC_SIZE); + return (batch->nr < FOLIO_BATCH_SIZE); } =20 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 =20 /* 31 pointers + header align the folio_batch structure to a power of two = */ -#define PAGEVEC_SIZE 31 +#define FOLIO_BATCH_SIZE 31 =20 struct folio; =20 @@ -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]; }; =20 /** @@ -58,7 +58,7 @@ static inline unsigned int folio_batch_count(const struct= folio_batch *fbatch) =20 static inline unsigned int folio_batch_space(const struct folio_batch *fba= tch) { - return PAGEVEC_SIZE - fbatch->nr; + return FOLIO_BATCH_SIZE - fbatch->nr; } =20 /** 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 *folio= q) { - return PAGEVEC_SIZE; + return FOLIO_BATCH_SIZE; } =20 /** 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, lof= f_t lstart, uoff_t lend, pgoff_t start =3D (lstart + PAGE_SIZE - 1) >> PAGE_SHIFT; pgoff_t end =3D (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 =3D 0; @@ -1510,7 +1510,7 @@ static int shmem_unuse_inode(struct inode *inode, uns= igned int type) struct address_space *mapping =3D inode->i_mapping; pgoff_t start =3D 0; struct folio_batch fbatch; - pgoff_t indices[PAGEVEC_SIZE]; + pgoff_t indices[FOLIO_BATCH_SIZE]; int ret =3D 0; =20 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 =3D arg.encoded_pages; int i; =20 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]; =20 folio_batch_init(&folios); for (int i =3D 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 *m= apping, 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 =3D start; unsigned long ret; @@ -672,7 +672,7 @@ int folio_unmap_invalidate(struct address_space *mappin= g, 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; --=20 2.39.5