Re: [RFC PATCH 0/5] Separate compound page from folio

From: Jason Gunthorpe

Date: Wed Feb 04 2026 - 13:49:21 EST


On Wed, Feb 04, 2026 at 01:29:45PM -0500, Zi Yan wrote:
> > For in-tree users, I am converting them all in this series.
>
> Considering a recent report[1], where drivers/scsi/sg.c allocates compound
> pages with __GFP_COMP and maps them into userspace via sg_vma_fault(),
> I guess almost all __GFP_COMP users are really using folios instead of
> compound pages.

This would be my guess, and it seems like a good cleanup to make them
actually create fully proper folios if they are being mmaped.

I suspect the only places not using "folios" are frozen page users (or
places yet to be converted to frozen pages)

Which is back to my previous remarks that having a good definition for
what struct page memory is allowed to be used by a frozen page user
would be helpful. If the mm can retain some of the tail page memory
for itself you don't need to make several of the changes here.

Jason