[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190912013759.GA4614@hori.linux.bs1.fc.nec.co.jp>
Date: Thu, 12 Sep 2019 01:37:59 +0000
From: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
To: David Hildenbrand <david@...hat.com>
CC: Oscar Salvador <osalvador@...e.de>,
"mhocko@...nel.org" <mhocko@...nel.org>,
"mike.kravetz@...cle.com" <mike.kravetz@...cle.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 02/10] mm,madvise: call soft_offline_page() without
MF_COUNT_INCREASED
On Wed, Sep 11, 2019 at 12:27:22PM +0200, David Hildenbrand wrote:
> On 10.09.19 12:30, Oscar Salvador wrote:
> > From: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
> >
> > Currently madvise_inject_error() pins the target via get_user_pages_fast.
> > The call to get_user_pages_fast is only to get the respective page
> > of a given address, but it is the job of the memory-poisoning handler
> > to deal with races, so drop the refcount grabbed by get_user_pages_fast.
> >
>
> Oh, and another question "it is the job of the memory-poisoning handler"
> - is that already properly implemented? (newbee question ¯\_(ツ)_/¯)
The above description might be confusing, sorry. It's intended likes
The call to get_user_pages_fast is only to get the pointer to struct
page of a given address, pinning it is memory-poisoning handler's job,
so drop the refcount grabbed by get_user_pages_fast.
And pinning is done in get_hwpoison_page() for hard-offline and
get_any_page() for soft-offline. For soft-offline case, the semantics of
refcount of poisoned pages is what this patchset tries to change/improve.
Thanks,
Naoya Horiguchi
Powered by blists - more mailing lists