Re: [PATCH v10 1/3] mm: rearrange madvise code to allow for reuse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Suren Baghdasaryan <surenb@xxxxxxxxxx> [211005 17:31]:
> On Tue, Oct 5, 2021 at 2:00 PM Liam Howlett <liam.howlett@xxxxxxxxxx> wrote:
> >
> > * Suren Baghdasaryan <surenb@xxxxxxxxxx> [211004 12:18]:
> > > On Mon, Oct 4, 2021 at 12:03 AM Rolf Eike Beer <eb@xxxxxxxxx> 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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux