[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211006173304.w77ksyuql6x5fbk2@revolver>
Date: Wed, 6 Oct 2021 17:33:12 +0000
From: Liam Howlett <liam.howlett@...cle.com>
To: Suren Baghdasaryan <surenb@...gle.com>
CC: Rolf Eike Beer <eb@...ix.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Colin Cross <ccross@...gle.com>,
Sumit Semwal <sumit.semwal@...aro.org>,
Michal Hocko <mhocko@...e.com>,
Dave Hansen <dave.hansen@...el.com>,
Kees Cook <keescook@...omium.org>,
Matthew Wilcox <willy@...radead.org>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Vlastimil Babka <vbabka@...e.cz>,
Johannes Weiner <hannes@...xchg.org>,
Jonathan Corbet <corbet@....net>,
Al Viro <viro@...iv.linux.org.uk>,
Randy Dunlap <rdunlap@...radead.org>,
Kalesh Singh <kaleshsingh@...gle.com>,
Peter Xu <peterx@...hat.com>,
"rppt@...nel.org" <rppt@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Catalin Marinas <catalin.marinas@....com>,
"vincenzo.frascino@....com" <vincenzo.frascino@....com>,
Chinwen Chang (張錦文)
<chinwen.chang@...iatek.com>,
Axel Rasmussen <axelrasmussen@...gle.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Jann Horn <jannh@...gle.com>,
"apopple@...dia.com" <apopple@...dia.com>,
John Hubbard <jhubbard@...dia.com>,
Yu Zhao <yuzhao@...gle.com>, Will Deacon <will@...nel.org>,
"fenghua.yu@...el.com" <fenghua.yu@...el.com>,
"thunder.leizhen@...wei.com" <thunder.leizhen@...wei.com>,
Hugh Dickins <hughd@...gle.com>,
"feng.tang@...el.com" <feng.tang@...el.com>,
Jason Gunthorpe <jgg@...pe.ca>, Roman Gushchin <guro@...com>,
Thomas Gleixner <tglx@...utronix.de>,
"krisman@...labora.com" <krisman@...labora.com>,
Chris Hyser <chris.hyser@...cle.com>,
Peter Collingbourne <pcc@...gle.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Jens Axboe <axboe@...nel.dk>,
"legion@...nel.org" <legion@...nel.org>,
Cyrill Gorcunov <gorcunov@...il.com>,
Pavel Machek <pavel@....cz>,
Muchun Song <songmuchun@...edance.com>,
Viresh Kumar <viresh.kumar@...aro.org>,
Thomas Cedeno <thomascedeno@...gle.com>,
"sashal@...nel.org" <sashal@...nel.org>,
"cxfcosmos@...il.com" <cxfcosmos@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>,
kernel-team <kernel-team@...roid.com>,
Pekka Enberg <penberg@...nel.org>,
Ingo Molnar <mingo@...nel.org>,
Oleg Nesterov <oleg@...hat.com>,
Jan Glauber <jan.glauber@...il.com>,
John Stultz <john.stultz@...aro.org>,
Rob Landley <rob@...dley.net>,
Cyrill Gorcunov <gorcunov@...nvz.org>,
"Serge E. Hallyn" <serge.hallyn@...ntu.com>,
David Rientjes <rientjes@...gle.com>,
Mel Gorman <mgorman@...e.de>, Shaohua Li <shli@...ionio.com>,
Minchan Kim <minchan@...nel.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: Re: [PATCH v10 1/3] mm: rearrange madvise code to allow for reuse
* Suren Baghdasaryan <surenb@...gle.com> [211005 17:31]:
> On Tue, Oct 5, 2021 at 2:00 PM Liam Howlett <liam.howlett@...cle.com> wrote:
> >
> > * Suren Baghdasaryan <surenb@...gle.com> [211004 12:18]:
> > > On Mon, Oct 4, 2021 at 12:03 AM Rolf Eike Beer <eb@...ix.com> wrote:
> > > >
> > > > > --- a/mm/madvise.c
> > > > > +++ b/mm/madvise.c
> > > > > @@ -63,76 +63,20 @@ static int madvise_need_mmap_write(int behavior)
> > > > > }
> > > > >
> > > > > /*
> > > > > - * We can potentially split a vm area into separate
> > > > > - * areas, each area with its own behavior.
> > > > > + * Update the vm_flags on regiion of a vma, splitting it or merging it as
> > > > ^^
> > >
> > > Thanks! Will fix in the next version.
> >
> > Since you'll be respinning for this comment, can you please point out
> > that the split will keep the VMA as [vma->vm_start, new_end)? That is,
> > __split_vma() is passed 0 for new_below. It might prove useful since
> > the code is being reused.
>
> Hmm. There are two cases here:
>
> if (start != vma->vm_start) {
> ...
> error = __split_vma(mm, vma, start, 1);
> }
>
> and
>
> if (end != vma->vm_end) {
> ...
> error = __split_vma(mm, vma, end, 0);
> }
>
> so, I don't think such a comment would be completely correct, no?
Yes, you are correct. I'm not sure how I missed that.
Thanks,
Liam
Powered by blists - more mailing lists