Linux MM drops PG_private to free a flag bit for folios
Zi Yan's patchset replaces the page flag with pointer checks so a scarce bit can become PG_folio.
The Linux memory-management tree is set to drop the long-standing PG_private page flag, converting every remaining user to a simple check that page or folio private data is non-NULL. The change, posted by Zi Yan of NVIDIA as a 16-part series, frees one of the scarce bits in the page-flags word and reserves that slot for an upcoming PG_folio flag that will distinguish ordinary pages from folio-backed ones.
Most callers already go through the folio attach and detach helpers, which keep a reference while private data is present, so they needed no behavioral change. A handful of exceptional users did: zsmalloc no longer marks the first component page with the flag; the kernel event ring buffer and fs/crypto simply test the private pointer; Xen grant-table code clears or frees foreign-page metadata according to pointer presence on 32-bit and 64-bit builds; erofs stopped overloading private as a reverse readahead list and now keeps an in-flight I/O counter non-zero with a bias so detach still drops the reference; f2fs adjusted its private-flag encoding so a zero private value is no longer a transient state that would confuse the new tests.
Andrew Morton said the MM portions look adequately reviewed and that he will queue the series for linux-next after a short soak, dropping any duplicate once a non-MM tree picks up the same change. David Hildenbrand supplied a string of reviews and acks across the hugetlb, Xen, f2fs, erofs, and flag-removal pieces. Matthew Wilcox separately offered replacement patches for the md-bitmap and buffer-head conversions.
An automated review bot warned that free paths might no longer catch leaked private data on head pages the way PAGE_FLAGS_CHECK_AT_FREE once did via PG_private. Maintainers treated the report lightly; the series already notes that PG_private is no longer examined at free time and leaves further cleanup of the now no-op set/clear helpers for a follow-up.
The practical result is one fewer flag consumers and a reserved bit for folio identification, continuing the kernel's multi-year move from single-page to folio-centric memory management without changing the external contract for ordinary filesystems that already use the attach/detach API.