lkml.org 
[lkml]   [2009]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 18/22] HWPOISON: use compound head page
In most places we want to test/operate on the compound head page. 
The raw poisoned page is recorded in hwpoison_control.p for others.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
mm/memory-failure.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
--- sound-2.6.orig/mm/memory-failure.c
+++ sound-2.6/mm/memory-failure.c
@@ -314,7 +314,8 @@ static const char *hwpoison_outcome_name

struct hwpoison_control {
unsigned long pfn;
- struct page *page;
+ struct page *p; /* corrupted page */
+ struct page *page; /* compound page head */
int outcome;
};

@@ -732,13 +733,17 @@ void memory_failure(unsigned long pfn, i
}

p = pfn_to_page(pfn);
- hpc.pfn = pfn;
- hpc.page = p;
if (TestSetPageHWPoison(p)) {
- action_result(&hpc, "already hardware poisoned", IGNORED);
+ printk(KERN_ERR
+ "MCE %#lx: already hardware poisoned: Ignored\n",
+ pfn);
return;
}

+ hpc.pfn = pfn;
+ hpc.p = p;
+ hpc.page = p = compound_head(p);
+
/*
* We need/can do nothing about count=0 pages.
* 1) it's a free page, and therefore in safe hand:
@@ -750,7 +755,7 @@ void memory_failure(unsigned long pfn, i
* In fact it's dangerous to directly bump up page count from 0,
* that may make page_freeze_refs()/page_unfreeze_refs() mismatch.
*/
- if (!get_page_unless_zero(compound_head(p))) {
+ if (!get_page_unless_zero(p)) {
action_result(&hpc, "free or high order kernel", IGNORED);
return;
}
--



\
 
 \ /
  Last update: 2009-06-15 05:23    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site