lkml.org 
[lkml]   [2019]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Recurring warning in page_copy_sane (inside copy_page_to_iter) when running stress tests involving drop_caches
On Wed, May 15, 2019 at 08:02:17AM -0700, Eric Dumazet wrote:
> On Wed, May 15, 2019 at 7:43 AM Matthew Wilcox <willy@infradead.org> wrote:
> > You're seeing a race between page_address(page) being called twice.
> > Between those two calls, something has caused the page to be removed from
> > the page_address_map() list. Eric's patch avoids calling page_address(),
> > so apply it and be happy.
>
> Hmm... wont the kmap_atomic() done later, after page_copy_sane() would
> suffer from the race ?
>
> It seems there is a real bug somewhere to fix.

No. page_address() called before the kmap_atomic() will look through
the list of mappings and see if that page is mapped somewhere. We unmap
lazily, so all it takes to trigger this race is that the page _has_
been mapped before, and its mapping gets torn down during this call.

While the page is kmapped, its mapping cannot be torn down.

\
 
 \ /
  Last update: 2019-05-15 17:19    [W:0.045 / U:35.408 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site