]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
mm/memory-failure.c: use compound_head() flags for huge pages
authorJames Morse <james.morse@arm.com>
Fri, 16 Jun 2017 21:02:29 +0000 (14:02 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 19 Jul 2017 07:58:21 +0000 (09:58 +0200)
commit13572dde6d270d930e921473ef9fb0436a497ba3
treea389963dcd13c3b340d7ae71a60550c8ae9e893e
parentd060f382cea150255ad91b53928ffd3c61782faa
mm/memory-failure.c: use compound_head() flags for huge pages

BugLink: http://bugs.launchpad.net/bugs/1702104
commit 7258ae5c5a2ce2f5969e8b18b881be40ab55433d upstream.

memory_failure() chooses a recovery action function based on the page
flags.  For huge pages it uses the tail page flags which don't have
anything interesting set, resulting in:

> Memory failure: 0x9be3b4: Unknown page state
> Memory failure: 0x9be3b4: recovery action for unknown page: Failed

Instead, save a copy of the head page's flags if this is a huge page,
this means if there are no relevant flags for this tail page, we use the
head pages flags instead.  This results in the me_huge_page() recovery
action being called:

> Memory failure: 0x9b7969: recovery action for huge page: Delayed

For hugepages that have not yet been allocated, this allows the hugepage
to be dequeued.

Fixes: 524fca1e7356 ("HWPOISON: fix misjudgement of page_action() for errors on mlocked pages")
Link: http://lkml.kernel.org/r/20170524130204.21845-1-james.morse@arm.com
Signed-off-by: James Morse <james.morse@arm.com>
Tested-by: Punit Agrawal <punit.agrawal@arm.com>
Acked-by: Punit Agrawal <punit.agrawal@arm.com>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
mm/memory-failure.c