aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-12-08 05:39:45 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:29:02 -0500
commit933e312e73f8fc39652bd4d216a5393cc3a014b9 (patch)
treea2aacc2a098c3c95fe5a94fef1a2cc9751bee79b /lib
parent8a8b6502fb669c3a0638a08955442814cedc86b1 (diff)
[PATCH] fault-injection capability for alloc_pages()
This patch provides fault-injection capability for alloc_pages() Boot option: fail_page_alloc=<interval>,<probability>,<space>,<times> <interval> -- specifies the interval of failures. <probability> -- specifies how often it should fail in percent. <space> -- specifies the size of free space where memory can be allocated safely in pages. <times> -- specifies how many times failures may happen at most. Debugfs: /debug/fail_page_alloc/interval /debug/fail_page_alloc/probability /debug/fail_page_alloc/specifies /debug/fail_page_alloc/times /debug/fail_page_alloc/ignore-gfp-highmem /debug/fail_page_alloc/ignore-gfp-wait Example: fail_page_alloc=10,100,0,-1 The page allocation (alloc_pages(), ...) fails once per 10 times. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig.debug7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index c7f567a57d7d..c66b7b400c9f 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -424,6 +424,13 @@ config FAILSLAB
424 help 424 help
425 This option provides fault-injection capabilitiy for kmalloc. 425 This option provides fault-injection capabilitiy for kmalloc.
426 426
427config FAIL_PAGE_ALLOC
428 bool "Fault-injection capabilitiy for alloc_pages()"
429 depends on DEBUG_KERNEL
430 select FAULT_INJECTION
431 help
432 This option provides fault-injection capabilitiy for alloc_pages().
433
427config FAULT_INJECTION_DEBUG_FS 434config FAULT_INJECTION_DEBUG_FS
428 bool "Debugfs entries for fault-injection capabilities" 435 bool "Debugfs entries for fault-injection capabilities"
429 depends on FAULT_INJECTION && SYSFS 436 depends on FAULT_INJECTION && SYSFS