Re: [PATCH v3 03/26] mm: introduce AS_NO_DIRECT_MAP
From: Yosry Ahmed
Date: Tue Oct 13 2026 - 14:17:17 EST
On Tue, Oct 13, 2026 at 8:26 AM Takahiro Itazuri <itazur@xxxxxxxxxx> wrote:
>
> On Thu, 3 Sep 2026 07:06:02 -0700, Yosry Ahmed <yosry@xxxxxxxxxx> wrote:
> > > If that work is not already underway,
> > > I would like to respin the AS_NO_DIRECT_MAP introduction and secretmem
> > > adoption as a standalone MM series, separate from ALLOC_UNMAPPED and
> > > mermap.
> [...]
> > Perhaps wait until I send the new version, then we can discuss if we
> > want to split it based on how the feedback looks like. Does this work
> > for you?
>
> Following up on this with an update. Yosry let me know off-list that
> ALLOC_UNMAPPED is on hold for now (quoted with permission):
>
> > I wanted to give you an update. I was working on v4 of the
> > ALLOC_UNMAPPED series while our team was simultaneously working on
> > integrating that design without internal ASI implementation.
> > Unfortunately, there were multiple complications with that
> > integration, and we will be holding off on sending new versions of the
> > ALLOC_UNMAPPED series until we have higher confidence that this
> > approach will meet ASI's requirements (ideally in a production
> > experiment).
>
> Since the integration with Google's internal ASI implementation needs
> more time, Yosry also agreed that I pick up the AS_NO_DIRECT_MAP work
> for guest_memfd, separate from ALLOC_UNMAPPED. Here is how I plan to
> proceed. Feedback is very welcome, especially from Sean on section 2
> below.
Thanks for the update, Takahrio!
> 3. ALLOC_UNMAPPED and the mermap
>
> AS_NO_DIRECT_MAP itself works without them, by zapping the direct map
> of each folio. However, guest_memfd will eventually need a temporary
> kernel mapping to populate guest memory via write() [2], because
> folios are already unmapped once they are added to the page cache.
> The cost of TLB flushes and direct map fragmentation also matters for
> performance, so I'd like to keep discussing these with folks
> upstream, building on the direct map fragmentation discussion that
> Kevin led at LPC [3].
FWIW, I think the mermap can still be used without ALLOC_UNMAPPED, and
I did have a newer version of the x86 patches repurposing the LDT area
for the mermap, and simplifying the mermap implementation a bit. I can
share them privately if you want to take a look.