Re: [PATCH] mm/vma: drop mm asynchronously in vma_start_read()

From: Suren Baghdasaryan

Date: Tue Nov 24 2026 - 11:35:05 EST


On Tue, Nov 24, 2026 at 8:06 AM Puranjay Mohan <puranjay12@xxxxxxxxx> wrote:
>
> On Tue, Nov 24, 2026 at 9:28 PM Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx> wrote:
> >
> > On Tue, Nov 24, 2026 at 07:51:42AM -0800, Suren Baghdasaryan wrote:
> > > Actually, VMAs are allocated from a SLAB_TYPESAFE_BY_RCU slub. With
> > > that RCU unlocking move you don't need other_mm copy and the comment
> > > that comes with it. VMA won't be freed until RCU lock is dropped.
> >
> > Yeah but they can be reassigned? They won't be _freed_ until a grace period but
> > they can go back to the slab and then allocated elsewhere right?
> >
>
> Yes, they can go back to the slab and become a different VMA.

Yeah, you are right about that. So, we either have to keep the RCU
unlock in place to keep other_mm comment valid (my personal
preference) or update the comment next to other_mm to explain the new
reason it is needed. Either way is fine with me.