Re: [PATCH 1/2] mm/shmem: add shmem_insert_folio()

From: Thomas Hellström

Date: Wed May 13 2026 - 11:14:13 EST


On Wed, 2026-05-13 at 13:36 +0200, David Hildenbrand (Arm) wrote:
> On 5/13/26 12:37, Thomas Hellström wrote:
>
>
> >
[...]
> > One alternative would be a single large sparse shmem object common
> > for
> > all DRM objects, with a range allocator, but that also got pretty
> > ugly
> > when I tried to implement that.
>
> Does not sound too crazy, though.
>
> >

Yeah, I stumbled on finding a reasonable idea to connect a shmem folio
to the pool LRUs and the range allocator metadata.

Assuming a shmem folio is pinned using the memfd pinning interface,
would folio->private be temporarily available?

Thanks,
Thomas