lkml.org 
[lkml]   [2020]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v7 11/14] mm,hwpoison: return 0 if the page is already poisoned in soft-offline
Date
On Tue, Sep 22, 2020 at 03:56:47PM +0200, Oscar Salvador wrote:
> Currently, there is an inconsistency when calling soft-offline from
> different paths on a page that is already poisoned.
>
> 1) madvise:
>
> madvise_inject_error skips any poisoned page and continues
> the loop.
> If that was the only page to madvise, it returns 0.
>
> 2) /sys/devices/system/memory/:
>
> When calling soft_offline_page_store()->soft_offline_page(),
> we return -EBUSY in case the page is already poisoned.
> This is inconsistent with a) the above example and b)
> memory_failure, where we return 0 if the page was poisoned.
>
> Fix this by dropping the PageHWPoison() check in madvise_inject_error, and
> let soft_offline_page return 0 if it finds the page already poisoned.
>
> Please, note that this represents a user-api change, since now the return
> error when calling soft_offline_page_store()->soft_offline_page() will be
> different.
>
> Signed-off-by: Oscar Salvador <osalvador@suse.de>

Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
\
 
 \ /
  Last update: 2020-09-23 09:39    [W:0.163 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site