summaryrefslogtreecommitdiffstats
path: root/mm/memory-failure.c
diff options
context:
space:
mode:
authorOscar Salvador <osalvador@suse.de>2020-12-15 04:11:45 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-15 21:13:44 +0100
commit47e431f43b5d879f04a2df645366ca007351ffff (patch)
treebef849c12f4107a6c05d1d8c77f42f30b347ec3f /mm/memory-failure.c
parentmm,hwpoison: disable pcplists before grabbing a refcount (diff)
downloadlinux-47e431f43b5d879f04a2df645366ca007351ffff.tar.xz
linux-47e431f43b5d879f04a2df645366ca007351ffff.zip
mm,hwpoison: remove drain_all_pages from shake_page
get_hwpoison_page already drains pcplists, previously disabling them when trying to grab a refcount. We do not need shake_page to take care of it anymore. Link: https://lkml.kernel.org/r/20201204102558.31607-4-osalvador@suse.de Signed-off-by: Oscar Salvador <osalvador@suse.de> Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com> Cc: Qian Cai <qcai@redhat.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r--mm/memory-failure.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 3ac807c1f4f3..cd10a520f2a8 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -263,8 +263,8 @@ static int kill_proc(struct to_kill *tk, unsigned long pfn, int flags)
}
/*
- * When a unknown page type is encountered drain as many buffers as possible
- * in the hope to turn the page into a LRU or free page, which we can handle.
+ * Unknown page type encountered. Try to check whether it can turn PageLRU by
+ * lru_add_drain_all, or a free page by reclaiming slabs when possible.
*/
void shake_page(struct page *p, int access)
{
@@ -273,9 +273,6 @@ void shake_page(struct page *p, int access)
if (!PageSlab(p)) {
lru_add_drain_all();
- if (PageLRU(p))
- return;
- drain_all_pages(page_zone(p));
if (PageLRU(p) || is_free_buddy_page(p))
return;
}