On Tue, Apr 21, 2026 at 12:51:00PM -0400, Gregory Price wrote: > On Tue, Apr 21, 2026 at 09:06:00AM -0400, Michael S. Tsirkin wrote: > > On Mon, Apr 20, 2026 at 10:38:19PM -0400, Gregory Price wrote: > > > > > > Can we leave folio_zero_user() callers the same, but add a PG_zeroed > > > check in folio_zero_user() that skips the zeroing (but not the cache > > > flush) and clear the PG_zeroed bit? > > > > > > Is this feasible? > > > > I do not see how - this would require leaking the page flag out of the > > buddy allocator. > > > > Right, but you're leaking that bit of information out one way or another > - whether it's a page-flag or something else (pghint_t) you have the > same lifecycle problems (when does it become invalidated? how long can > it be trusted for?). > > I suppose at least with (pghint_t) the data (in theory) falls out of > scope and doesn't live with the page - but guaranteed it just ends up > polluting more and more interfaces. > > I'm seeing why David's suggest to plumb __GFP_ZERO correctly makes > sense, it's really the only feasible approach here that doesn't generate > a staleness problem with whatever information you try to leak out. > > ~Gregory
OK, v3 with that incoming.

