]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm: hwpoison: dump page for unhandlable page
authorYang Shi <shy828301@gmail.com>
Mon, 23 Aug 2021 23:59:28 +0000 (09:59 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Aug 2021 23:34:08 +0000 (09:34 +1000)
Currently just very simple message is shown for unhandlable page, e.g.
non-LRU page, like:
soft_offline: 0x1469f2: unknown non LRU page type 5ffff0000000000 ()

It is not very helpful for further debug, calling dump_page() could show
more useful information.

Calling dump_page() in get_any_page() in order to not duplicate the call
in a couple of different places.  It may be called with pcp disabled and
holding memory hotplug lock, it should be not a big deal since hwpoison
handler is not called very often.

Link: https://lkml.kernel.org/r/20210819054116.266126-3-shy828301@gmail.com
Signed-off-by: Yang Shi <shy828301@gmail.com>
Suggested-by: Matthew Wilcox <willy@infradead.org>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: David Hildenbrand <david@redhat.com>
Cc: David Mackey <tdmackey@twitter.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/memory-failure.c

index 5decacb86b9fc8eda2fc73d47a02cecd49d02f0b..d1e6f4d948e59cf0991e37f642dd159d9478757e 100644 (file)
@@ -1228,6 +1228,9 @@ try_again:
                ret = -EIO;
        }
 out:
+       if (ret == -EIO)
+               dump_page(p, "hwpoison: unhandlable page");
+
        return ret;
 }