[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220117011231.rkcdvkfqozdaexcg@revolver>
Date: Mon, 17 Jan 2022 01:12:39 +0000
From: Liam Howlett <liam.howlett@...cle.com>
To: Vlastimil Babka <vbabka@...e.cz>
CC: "maple-tree@...ts.infradead.org" <maple-tree@...ts.infradead.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Song Liu <songliubraving@...com>,
Davidlohr Bueso <dave@...olabs.net>,
"Paul E . McKenney" <paulmck@...nel.org>,
Matthew Wilcox <willy@...radead.org>,
Laurent Dufour <ldufour@...ux.ibm.com>,
David Rientjes <rientjes@...gle.com>,
Axel Rasmussen <axelrasmussen@...gle.com>,
Suren Baghdasaryan <surenb@...gle.com>,
Rik van Riel <riel@...riel.com>,
Peter Zijlstra <peterz@...radead.org>,
Michel Lespinasse <walken.cr@...il.com>,
Jerome Glisse <jglisse@...hat.com>,
Minchan Kim <minchan@...gle.com>,
Joel Fernandes <joelaf@...gle.com>,
Rom Lemarchand <romlem@...gle.com>
Subject: Re: [PATCH v4 16/66] mm: Remove rb tree.
* Vlastimil Babka <vbabka@...e.cz> [220112 07:03]:
> On 12/1/21 15:29, Liam Howlett wrote:
> > From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
> >
> > Remove the RB tree and start using the maple tree for vm_area_struct
> > tracking.
> >
> > Drop validate_mm() calls in expand_upwards() and expand_downwards() as
> > the lock is not held.
> >
> > Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>
>
> Acked-by: Vlastimil Babka <vbabka@...e.cz>
>
> > ---
> > arch/x86/kernel/tboot.c | 1 -
> > drivers/firmware/efi/efi.c | 1 -
> > include/linux/mm.h | 2 -
> > include/linux/mm_types.h | 14 --
> > kernel/fork.c | 8 -
> > mm/init-mm.c | 2 -
> > mm/mmap.c | 496 ++++++++-----------------------------
> > mm/nommu.c | 88 ++-----
> > mm/util.c | 8 +
> > 9 files changed, 136 insertions(+), 484 deletions(-)
>
> Nice stats.
Thanks.
>
> Wanted to suggest splitting out the swith to range_has_overlap() but I think
> I see how it's not feasible.
>
> > diff --git a/mm/util.c b/mm/util.c
> > index e58151a61255..ab02382c2d57 100644
> > --- a/mm/util.c
> > +++ b/mm/util.c
> > @@ -287,6 +287,8 @@ void __vma_link_list(struct mm_struct *mm, struct vm_area_struct *vma,
> > vma->vm_next = next;
> > if (next)
> > next->vm_prev = vma;
> > + else
> > + mm->highest_vm_end = vm_end_gap(vma);
> > }
> >
> > void __vma_unlink_list(struct mm_struct *mm, struct vm_area_struct *vma)
> > @@ -301,6 +303,12 @@ void __vma_unlink_list(struct mm_struct *mm, struct vm_area_struct *vma)
> > mm->mmap = next;
> > if (next)
> > next->vm_prev = prev;
> > + else {
>
> Nit: style suggests that once else is { } block then if block should be too,
> even though it remains a single line.
Ack, I will fix this. Although this function is completely dropped
later in the series.
>
> > + if (prev)
> > + mm->highest_vm_end = vm_end_gap(prev);
> > + else
> > + mm->highest_vm_end = 0;
> > + }
> > }
> >
> > /* Check if the vma is being used as a stack by this task */
>
>
Powered by blists - more mailing lists