linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Lech Perczak <l.perczak@camlintechnologies.com>
To: Matthew Wilcox <willy@infradead.org>, Eric Dumazet <edumazet@google.com>
Cc: "Al Viro" <viro@zeniv.linux.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Piotr Figiel" <p.figiel@camlintechnologies.com>,
	"Krzysztof Drobiński" <k.drobinski@camlintechnologies.com>,
	"Pawel Lenkow" <p.lenkow@camlintechnologies.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Subject: Re: Recurring warning in page_copy_sane (inside copy_page_to_iter) when running stress tests involving drop_caches
Date: Thu, 16 May 2019 15:18:23 +0000	[thread overview]
Message-ID: <79c406af-3cc4-1e63-80d5-267900520ef8@camlintechnologies.com> (raw)
In-Reply-To: <20190515151814.GD31704@bombadil.infradead.org>


W dniu 15.05.2019 o 17:18, Matthew Wilcox pisze:
> 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.

And that's the answer I'm really glad to hear. 
In the meantime I've set up a test run with CONFIG_HIGHMEM disabled
to be extra sure, however quite expectedly it robs the system of 256MiB
of accessible memory.

Unfortunatly, looking through defconfigs for 32-bit ARM, CONFIG_HIGHMEM
is enabled in quite a few of them, i.MX included.

I'll pick up the patch then and drop it when it gets included in 4.19.y.
Thanks!

--
With kind regards,
Lech


  reply	other threads:[~2019-05-16 15:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d68c83ba-bf5a-f6e8-44dd-be98f45fc97a@camlintechnologies.com>
2019-04-26  8:42 ` Recurring warning in page_copy_sane (inside copy_page_to_iter) when running stress tests involving drop_caches Lech Perczak
2019-05-15 13:18   ` Lech Perczak
2019-05-15 14:43     ` Matthew Wilcox
2019-05-15 15:02       ` Eric Dumazet
2019-05-15 15:18         ` Matthew Wilcox
2019-05-16 15:18           ` Lech Perczak [this message]
2019-05-15 15:04       ` Greg Kroah-Hartman
2019-05-15 15:20         ` Matthew Wilcox
2019-05-15 15:37           ` Greg Kroah-Hartman
2019-05-20 11:05           ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=79c406af-3cc4-1e63-80d5-267900520ef8@camlintechnologies.com \
    --to=l.perczak@camlintechnologies.com \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=k.drobinski@camlintechnologies.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=p.figiel@camlintechnologies.com \
    --cc=p.lenkow@camlintechnologies.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).