Skip to contentSkip to conversation

mm: remove PageWriteback

PATCH Applied Tal Zussman 4 participants 4 messages Sep 5 – Sep 7

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: remove PageWriteback

The last caller of PageWriteback() was removed in commit f75987e543c2 ("libceph: remove pinning assertion in ceph_msg_data_iter_next()"). This flag is now only used on folios, so we can remove all the page accessors. folio_test_clear_writeback() is not used, so don't add FOLIO_TEST_CLEAR_FLAG() for it.

---
 include/linux/page-flags.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/page-flags.h +2 -2
index 3dc79c0c5adf..86dd0470da11 100644
@@ -588,8 +588,8 @@ FOLIO_FLAG(owner_2, FOLIO_HEAD_PAGE)
  * Only test-and-set exist for PG_writeback.  The unconditional operators are
  * risky: they bypass page accounting.
  */
-TESTPAGEFLAG(Writeback, writeback, PF_NO_TAIL)
-	TESTSCFLAG(Writeback, writeback, PF_NO_TAIL)
+FOLIO_TEST_FLAG(writeback, FOLIO_HEAD_PAGE)
+	FOLIO_TEST_SET_FLAG(writeback, FOLIO_HEAD_PAGE)
 FOLIO_FLAG(mappedtodisk, FOLIO_HEAD_PAGE)
 
 /* PG_readahead is only used for reads; PG_reclaim is only for writes */

---
base-commit: b733fe31e781ed45c56d2ec561dbb61a903693c8
change-id: 20260904-remove-pagewriteback-69d2aa5b3ee9

Best regards,

Signature · 1 line
Tal Zussman <[email protected]>
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Tal Zussman

The last caller of PageWriteback() was removed in commit f75987e543c2 ("libceph: remove pinning assertion in ceph_msg_data_iter_next()"). This flag is now only used on folios, so we can remove all the page accessors. folio_test_clear_writeback() is not used, so don't add FOLIO_TEST_CLEAR_FLAG() for it.

Nice! LGTM so:

Quoted 24 lines
---
 include/linux/page-flags.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/page-flags.h +2 -3
index 3dc79c0c5adf..86dd0470da11 100644
@@ -588,8 +588,8 @@ FOLIO_FLAG(owner_2, FOLIO_HEAD_PAGE)
  * Only test-and-set exist for PG_writeback.  The unconditional operators are
  * risky: they bypass page accounting.
  */
-TESTPAGEFLAG(Writeback, writeback, PF_NO_TAIL)
-	TESTSCFLAG(Writeback, writeback, PF_NO_TAIL)
+FOLIO_TEST_FLAG(writeback, FOLIO_HEAD_PAGE)
+	FOLIO_TEST_SET_FLAG(writeback, FOLIO_HEAD_PAGE)
 FOLIO_FLAG(mappedtodisk, FOLIO_HEAD_PAGE)
 
 /* PG_readahead is only used for reads; PG_reclaim is only for writes */
 
---

base-commit: b733fe31e781ed45c56d2ec561dbb61a903693c8
change-id: 20260904-remove-pagewriteback-69d2aa5b3ee9

Quoted 4 lines

Best regards,
--
Tal Zussman <[email protected]>

--
Cheers, Lorenzo

maintainer Acked-by
#2 lore raw
Quoted 7 lines · Lorenzo Stoakes (ARM)
Quoted 6 lines · Tal Zussman

The last caller of PageWriteback() was removed in commit f75987e543c2 ("libceph: remove pinning assertion in ceph_msg_data_iter_next()"). This flag is now only used on folios, so we can remove all the page accessors. folio_test_clear_writeback() is not used, so don't add FOLIO_TEST_CLEAR_FLAG() for it.

Quoted 5 lines
Quoted 1 line

Nice! LGTM so:

Indeed!

Signature · 3 lines
Cheers,

David
Reviewed-by on v1 1/1
#3 lore raw
In reply to Tal Zussman
Quoted 5 lines · On Sat, 05 Sep 2026 15:08:30 -0400 Tal Zussman <[email protected]> wrote:

The last caller of PageWriteback() was removed in commit f75987e543c2 ("libceph: remove pinning assertion in ceph_msg_data_iter_next()"). This flag is now only used on folios, so we can remove all the page accessors. folio_test_clear_writeback() is not used, so don't add FOLIO_TEST_CLEAR_FLAG() for it.

Looks good to me.

Quoted 2 lines

Thanks,
SJ

[...]