Re: [PATCH v2 2/3] mm: use folio_add_new_anon_rmap() if folio_test_anon(folio)==false

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

 



On Tue, Jun 25, 2024 at 11:25 AM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Sat, 22 Jun 2024 15:20:02 +1200 Barry Song <21cnbao@xxxxxxxxx> wrote:
>
> > > >
> > > > Since this is primarily a documentation update, I'll wait for two or
> > > > three days to see if
> > > > there are any more Linux-next reports before sending v3 combining these fixes
> > > > together(I've already fixed another doc warn reported by lkp) and seek Andrew's
> > > > assistance to drop v2 and apply v3.
> > >
> > > Feel free to send fixup patches for such small stuff (for example, as
> > > reply to this mail). Usually, no need for a new series. Andrew will
> > > squash all fixups before merging it to mm-stable.
> >
> > Hi Andrew,
> >
> > Can you please squash this change(another one suggested by David)?
>
> sure, but...
>
> > From: Barry Song <v-songbaohua@xxxxxxxx>
> > Date: Sat, 22 Jun 2024 15:14:53 +1200
> > Subject: [PATCH] enhance doc- mm: use folio_add_new_anon_rmap() if
> >  folio_test_anon(folio)==false
>
> The only description we have here is "enhance doc"
>
> > --- a/mm/memory.c
> > +++ b/mm/memory.c
> > @@ -4346,6 +4346,7 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
> >                * here, we have to be careful.
> >                */
> >               VM_WARN_ON_ONCE(folio_test_large(folio));
> > +             VM_WARN_ON_FOLIO(!folio_test_locked(folio), folio);
>
> And these aren't documentation changes.  Please send along a small
> changelog for this patch.

Thanks for the suggestion.
Could we have this in changelog?

For new anon(!anon), there's a possibility that multiple concurrent threads
might execute "if (!anon) folio_add_new_anon_rmap()" in parallel. In such
cases, the threads should lock the folio before executing this sequence.
We use VM_WARN_ON_FOLIO() to verify if this condition holds true.

>

Thanks
Barry





[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