On Thu, May 14, 2026 at 11:47:19AM -0400, Michael S. Tsirkin wrote:
> On Thu, May 14, 2026 at 11:41:45AM -0400, Gregory Price wrote:
> > On Thu, May 14, 2026 at 11:34:14AM -0400, Michael S. Tsirkin wrote:
> > > On Thu, May 14, 2026 at 11:32:26AM -0400, Gregory Price wrote:
> > > > > >
> > > > > > Maybe mildly out of scope but worth asking: Are there other flags
> > > > > > that
> > > > > > should be retained/propogated on a split? If so, rather than pass
> > > > > > was_reported, should we just take a temporary copy of the page
> > > > > > flags and
> > > > > > pass them all in?
> > > > > >
> > > > > > ~Gregory
> > > > >
> > > > >
> > > > > Not that I can see, no.
> > > > >
> > > >
> > > > You do this exact thing again later :]
> > > >
> > > > https://lore.kernel.org/linux-mm/9a22e0f9bbe1278913754db6df76e291a006181a.1778616612.git....@redhat.com/
> > > >
> > > > ~Gregory
> > >
> > > I mean yes, reported and zeroed) Just zeroed does not exist at this
> > > stage in the series.
> > >
> >
> > More of a forward looking question: if we already know we're adding
> > was_reported and was_zeroed, maybe we should just pass the page flags
> > through entirely and let expand() check them instead of passing it
> > through individually.
> >
> > We end up doing something similar with post_alloc_hook later as well, so
> > I'm wondering if there's a general improvement that can be made here.
> >
> > ~Gregory
>
> sure, will do. do you want a bitwise thing for type safety? or just a
> long?
>
Can probably just do like:
flags = stable_page_flags(page);
plumbing...
expand(..., buddy_flags) {
if (test_bit(PG_reported, buddy_flags))
...
if (test_bit(PG_zeroed, buddy_flags))
...
}
or whatever makes sense.
~Gregory