aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-12-16 06:19:58 -0500
committerAndi Kleen <ak@linux.intel.com>2009-12-16 06:19:58 -0500
commit847ce401df392b0704369fd3f75df614ac1414b4 (patch)
tree7c5021386dedea0d12f8a05b00c5267c4d28e426 /include
parent8d22ba1b74aa9420b6032d856446564fb21f8090 (diff)
HWPOISON: Add unpoisoning support
The unpoisoning interface is useful for stress testing tools to reclaim poisoned pages (to prevent OOM) There is no hardware level unpoisioning, so this cannot be used for real memory errors, only for software injected errors. Note that it may leak pages silently - those who have been removed from LRU cache, but not isolated from page cache/swap cache at hwpoison time. Especially the stress test of dirty swap cache pages shall reboot system before exhausting memory. AK: Fix comments, add documentation, add printks, rename symbol Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/page-flags.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 135e19198cd3..8cdb941fc7b5 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1336,6 +1336,7 @@ enum mf_flags {
1336}; 1336};
1337extern void memory_failure(unsigned long pfn, int trapno); 1337extern void memory_failure(unsigned long pfn, int trapno);
1338extern int __memory_failure(unsigned long pfn, int trapno, int flags); 1338extern int __memory_failure(unsigned long pfn, int trapno, int flags);
1339extern int unpoison_memory(unsigned long pfn);
1339extern int sysctl_memory_failure_early_kill; 1340extern int sysctl_memory_failure_early_kill;
1340extern int sysctl_memory_failure_recovery; 1341extern int sysctl_memory_failure_recovery;
1341extern void shake_page(struct page *p); 1342extern void shake_page(struct page *p);
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 49e907bd067f..f9df6308af95 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -275,7 +275,7 @@ PAGEFLAG_FALSE(Uncached)
275 275
276#ifdef CONFIG_MEMORY_FAILURE 276#ifdef CONFIG_MEMORY_FAILURE
277PAGEFLAG(HWPoison, hwpoison) 277PAGEFLAG(HWPoison, hwpoison)
278TESTSETFLAG(HWPoison, hwpoison) 278TESTSCFLAG(HWPoison, hwpoison)
279#define __PG_HWPOISON (1UL << PG_hwpoison) 279#define __PG_HWPOISON (1UL << PG_hwpoison)
280#else 280#else
281PAGEFLAG_FALSE(HWPoison) 281PAGEFLAG_FALSE(HWPoison)