Re: [PATCH v6 10/16] mm: replace vm_lock and detached flag with a reference count
From: Peter Zijlstra
Date: Mon Dec 16 2024 - 17:00:59 EST
On Mon, Dec 16, 2024 at 01:53:06PM -0800, Suren Baghdasaryan wrote:
> > That is, should this not live in vma_iter_store*(), right before
> > mas_store_gfp() ?
>
> Currently it's done right *after* mas_store_gfp() but I was debating
> with myself if it indeed should be *before* insertion into the tree...
The moment it goes into the tree it becomes visible to RCU lookups, it's
a bit weird to have them with !refcnt at that point, but I don't suppose
it harms.