Re: [PATCH 3/7] mm,madvise: call soft_offline_page() without MF_COUNT_INCREASED

2020-12-06 Thread Oscar Salvador
On 2020-12-07 03:34, HORIGUCHI NAOYA wrote: diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 869ece2a1de2..ba861169c9ae 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1269,6 +1269,12 @@ static int memory_failure_dev_pagemap(unsigned long pfn, int flags, if

Re: [PATCH 3/7] mm,madvise: call soft_offline_page() without MF_COUNT_INCREASED

2020-12-06 Thread 堀口 直也
On Sat, Dec 05, 2020 at 04:34:23PM +0100, Oscar Salvador wrote: > On Fri, Dec 04, 2020 at 06:25:31PM +0100, Vlastimil Babka wrote: > > OK, so that means we don't introduce this race for MADV_SOFT_OFFLINE, but > > it's > > already (and still) there for MADV_HWPOISON since Dan's 23e7b5c2e271 ("mm,

Re: [PATCH 3/7] mm,madvise: call soft_offline_page() without MF_COUNT_INCREASED

2020-12-05 Thread Oscar Salvador
On Fri, Dec 04, 2020 at 06:25:31PM +0100, Vlastimil Babka wrote: > OK, so that means we don't introduce this race for MADV_SOFT_OFFLINE, but it's > already (and still) there for MADV_HWPOISON since Dan's 23e7b5c2e271 ("mm, > madvise_inject_error: Let memory_failure() optionally take a page

Re: [PATCH 3/7] mm,madvise: call soft_offline_page() without MF_COUNT_INCREASED

2020-12-04 Thread Vlastimil Babka
On 12/1/20 12:35 PM, Oscar Salvador wrote: > On Wed, Nov 25, 2020 at 07:20:33PM +0100, Vlastimil Babka wrote: >> On 11/19/20 11:57 AM, Oscar Salvador wrote: >> > From: Naoya Horiguchi >> > >> > The call to get_user_pages_fast is only to get the pointer to a struct >> > page of a given address,

Re: [PATCH 3/7] mm,madvise: call soft_offline_page() without MF_COUNT_INCREASED

2020-12-01 Thread Oscar Salvador
On Wed, Nov 25, 2020 at 07:20:33PM +0100, Vlastimil Babka wrote: > On 11/19/20 11:57 AM, Oscar Salvador wrote: > > From: Naoya Horiguchi > > > > The call to get_user_pages_fast is only to get the pointer to a struct > > page of a given address, pinning it is memory-poisoning handler's job, > >

Re: [PATCH 3/7] mm,madvise: call soft_offline_page() without MF_COUNT_INCREASED

2020-11-25 Thread Vlastimil Babka
On 11/19/20 11:57 AM, Oscar Salvador wrote: From: Naoya Horiguchi The call to get_user_pages_fast is only to get the pointer to a struct page of a given address, pinning it is memory-poisoning handler's job, so drop the refcount grabbed by get_user_pages_fast(). Note that the target page is

[PATCH 3/7] mm,madvise: call soft_offline_page() without MF_COUNT_INCREASED

2020-11-19 Thread Oscar Salvador
From: Naoya Horiguchi The call to get_user_pages_fast is only to get the pointer to a struct page of a given address, pinning it is memory-poisoning handler's job, so drop the refcount grabbed by get_user_pages_fast(). Note that the target page is still pinned after this put_page() because the