diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2009-12-16 06:19:58 -0500 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2009-12-16 06:19:58 -0500 |
commit | 8d22ba1b74aa9420b6032d856446564fb21f8090 (patch) | |
tree | 6c2e2d27e81d784faa0481500f1cecc613ff1167 /mm/memory-failure.c | |
parent | 95d01fc664b9476e0d18e3d745bb209a42a33588 (diff) |
HWPOISON: detect free buddy pages explicitly
Most free pages in the buddy system have no PG_buddy set.
Introduce is_free_buddy_page() for detecting them reliably.
CC: Nick Piggin <npiggin@suse.de>
CC: Mel Gorman <mel@linux.vnet.ibm.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r-- | mm/memory-failure.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 676ab394200e..5055b940df5f 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -807,8 +807,13 @@ int __memory_failure(unsigned long pfn, int trapno, int flags) | |||
807 | */ | 807 | */ |
808 | if (!(flags & MF_COUNT_INCREASED) && | 808 | if (!(flags & MF_COUNT_INCREASED) && |
809 | !get_page_unless_zero(compound_head(p))) { | 809 | !get_page_unless_zero(compound_head(p))) { |
810 | action_result(pfn, "free or high order kernel", IGNORED); | 810 | if (is_free_buddy_page(p)) { |
811 | return PageBuddy(compound_head(p)) ? 0 : -EBUSY; | 811 | action_result(pfn, "free buddy", DELAYED); |
812 | return 0; | ||
813 | } else { | ||
814 | action_result(pfn, "high order kernel", IGNORED); | ||
815 | return -EBUSY; | ||
816 | } | ||
812 | } | 817 | } |
813 | 818 | ||
814 | /* | 819 | /* |