[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALvZod5EWuUu7MfJ12_+QTY2MUinmShoS+0hoRGVcn5Q1G6eHw@mail.gmail.com>
Date: Fri, 4 Jun 2021 21:19:55 -0700
From: Shakeel Butt <shakeelb@...gle.com>
To: Liam Howlett <liam.howlett@...cle.com>
Cc: Alistair Popple <apopple@...dia.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
"bskeggs@...hat.com" <bskeggs@...hat.com>,
"rcampbell@...dia.com" <rcampbell@...dia.com>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"jhubbard@...dia.com" <jhubbard@...dia.com>,
"bsingharora@...il.com" <bsingharora@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"hch@...radead.org" <hch@...radead.org>,
"jglisse@...hat.com" <jglisse@...hat.com>,
"willy@...radead.org" <willy@...radead.org>,
"jgg@...dia.com" <jgg@...dia.com>,
"peterx@...hat.com" <peterx@...hat.com>,
"hughd@...gle.com" <hughd@...gle.com>,
Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v9 03/10] mm/rmap: Split try_to_munlock from try_to_unmap
On Fri, Jun 4, 2021 at 8:39 PM Liam Howlett <liam.howlett@...cle.com> wrote:
>
> > Particularly the following paragraph:
> > ...
> > Vlastimil Babka points out another race which this patch protects against.
> > try_to_unmap_one() might reach its mlock_vma_page() TestSetPageMlocked a
> > moment after munlock_vma_pages_all() did its Phase 1 TestClearPageMlocked:
> > leaving PageMlocked and unevictable when it should be evictable. mmap_sem
> > is ineffective because exit_mmap() does not hold it; page lock ineffective
> > because __munlock_pagevec() only takes it afterwards, in Phase 2; pte lock
> > is effective because __munlock_pagevec_fill() takes it to get the page,
> > after VM_LOCKED was cleared from vm_flags, so visible to try_to_unmap_one.
> > ...
>
> So this is saying the race with exit_mmap() isn't benign after all?
>
Yes, not benign at all.
Powered by blists - more mailing lists