Skip to contentSkip to conversation

mm: hwpoison: change PageHWPoison behavior on hugetlb pages

PATCH New [email protected] 1 participant 1 message Jul 10, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 10/115 mm: hwpoison: change PageHWPoison behavior on hugetlb pages

From: Naoya Horiguchi <[email protected]>
Subject: mm: hwpoison: change PageHWPoison behavior on hugetlb pages

We'd like to narrow down the error region in memory error on hugetlb pages. However, currently we set PageHWPoison flags on all subpages in the error hugepage and add # of subpages to num_hwpoison_pages, which doesn't fit our purpose.

So this patch changes the behavior and we only set PageHWPoison on the head page then increase num_hwpoison_pages only by 1. This is a preparation for narrow-down part which comes in later patches.

---

 include/linux/swapops.h |    9 ---
 mm/memory-failure.c     |   87 ++++++++++----------------------------
 2 files changed, 24 insertions(+), 72 deletions(-)
include/linux/swapops.h renamed from include/linux/swapops.h~mm-hwpoison-change-pagehwpoison-behavior-on-hugetlb-pages +0 -9
diff -puN include/linux/swapops.h~mm-hwpoison-change-pagehwpoison-behavior-on-hugetlb-pages include/linux/swapops.h
@@ -196,15 +196,6 @@ static inline void num_poisoned_pages_de
 	atomic_long_dec(&num_poisoned_pages);
 }
 
-static inline void num_poisoned_pages_add(long num)
-{
-	atomic_long_add(num, &num_poisoned_pages);
-}
-
-static inline void num_poisoned_pages_sub(long num)
-{
-	atomic_long_sub(num, &num_poisoned_pages);
-}
 #else
 
 static inline swp_entry_t make_hwpoison_entry(struct page *page)
mm/memory-failure.c renamed from mm/memory-failure.c~mm-hwpoison-change-pagehwpoison-behavior-on-hugetlb-pages +24 -63

178 lines not on this page · raw message

_