[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJuCfpGFXbSFnqQtikNq0RoMfc93cLLnqrApq8211H+FpZpJ1Q@mail.gmail.com>
Date: Thu, 11 Sep 2025 09:51:33 -0700
From: Suren Baghdasaryan <surenb@...gle.com>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: "Liam R. Howlett" <Liam.Howlett@...cle.com>, Andrew Morton <akpm@...ux-foundation.org>,
maple-tree@...ts.infradead.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, David Hildenbrand <david@...hat.com>,
Vlastimil Babka <vbabka@...e.cz>, Michal Hocko <mhocko@...e.com>, Jann Horn <jannh@...gle.com>,
Pedro Falcato <pfalcato@...e.de>, Charan Teja Kalla <quic_charante@...cinc.com>, shikemeng@...weicloud.com,
kasong@...cent.com, nphamcs@...il.com, bhe@...hat.com, baohua@...nel.org,
chrisl@...nel.org, Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH v1 7/9] mm: Introduce unmap_desc struct to reduce function arguments
On Thu, Sep 11, 2025 at 2:22 AM Lorenzo Stoakes
<lorenzo.stoakes@...cle.com> wrote:
>
> On Tue, Sep 09, 2025 at 02:44:05PM -0700, Suren Baghdasaryan wrote:
> > On Tue, Sep 9, 2025 at 12:11 PM Liam R. Howlett <Liam.Howlett@...cle.com> wrote:
> > > +struct unmap_desc {
> > > + struct ma_state *mas; /* the maple state point to the first vma */
> > > + struct vm_area_struct *first; /* The first vma */
> > > + unsigned long first_pgaddr; /* The first pagetable address to free */
> > > + unsigned long last_pgaddr; /* The last pagetable address to free */
> > > + unsigned long vma_min; /* The min vma address */
> > > + unsigned long vma_max; /* The max vma address */
> > > + unsigned long tree_max; /* Maximum for the vma tree search */
> > > + unsigned long tree_reset; /* Where to reset the vma tree walk */
> > > + bool mm_wr_locked; /* If the mmap write lock is held */
> > > +};
> > > +
> > > +#define UNMAP_REGION(name, _vmi, _vma, _vma_min, _vma_max, _prev, _next) \
> >
> > Maybe DEFINE_UNMAP_REGION() similar to DEFINE_PER_CPU() or DEFINE_SPINLOCK()?
>
> Look at MMAP_STATE(), VMG_MMAP_STATE() for precedent in vma.c
Yeah but UNMAP_REGION() sounds like an action while MMAP_STATE(),
VMG_MMAP_STATE() do not. Anyway, whatever works I guess.
Powered by blists - more mailing lists