Commit 2fe62e22 authored by Miaohe Lin's avatar Miaohe Lin Committed by Andrew Morton
Browse files

mm, hwpoison: use ClearPageHWPoison() in memory_failure()

Patch series "A few cleanup patches for memory-failure".

his series contains a few cleanup patches to use __PageMovable() to detect
non-lru movable pages, use num_poisoned_pages_sub() to reduce multiple
atomic ops overheads and so on.  More details can be found in the
respective changelogs.


This patch (of 6):

Use ClearPageHWPoison() instead of TestClearPageHWPoison() to clear page
hwpoison flags to avoid unneeded full memory barrier overhead.

Link: https://lkml.kernel.org/r/20220830123604.25763-1-linmiaohe@huawei.com
Link: https://lkml.kernel.org/r/20220830123604.25763-2-linmiaohe@huawei.com


Signed-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Acked-by: default avatarNaoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 4d24de94
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2131,7 +2131,7 @@ int memory_failure(unsigned long pfn, int flags)
	page_flags = p->flags;
	page_flags = p->flags;


	if (hwpoison_filter(p)) {
	if (hwpoison_filter(p)) {
		TestClearPageHWPoison(p);
		ClearPageHWPoison(p);
		unlock_page(p);
		unlock_page(p);
		put_page(p);
		put_page(p);
		res = -EOPNOTSUPP;
		res = -EOPNOTSUPP;