Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: fault-injection: fix defaults

ignore-gfp-wait and ignore-gfp-highmem defaults are actually true (Y) in
both failslab and fail_page_alloc, not false as the docs suggest. See
page_alloc.c:3762 and failslab.c:13

At the same time use 'Y' instead of '1' in the example scripts just for
consistency. (though 1 would work)

Signed-off-by: Dylan Yudaken <dylany@fb.com>
Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Dylan Yudaken and committed by
Jonathan Corbet
bad3fbb2 e01159c7

+7 -7
+7 -7
Documentation/fault-injection/fault-injection.rst
··· 132 132 133 133 Format: { 'Y' | 'N' } 134 134 135 - default is 'N', setting it to 'Y' won't inject failures into 136 - highmem/user allocations. 135 + default is 'Y', setting it to 'N' will also inject failures into 136 + highmem/user allocations (__GFP_HIGHMEM allocations). 137 137 138 138 - /sys/kernel/debug/failslab/ignore-gfp-wait: 139 139 - /sys/kernel/debug/fail_page_alloc/ignore-gfp-wait: 140 140 141 141 Format: { 'Y' | 'N' } 142 142 143 - default is 'N', setting it to 'Y' will inject failures 144 - only into non-sleep allocations (GFP_ATOMIC allocations). 143 + default is 'Y', setting it to 'N' will also inject failures 144 + into allocations that can sleep (__GFP_DIRECT_RECLAIM allocations). 145 145 146 146 - /sys/kernel/debug/fail_page_alloc/min-order: 147 147 ··· 280 280 printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times 281 281 echo 0 > /sys/kernel/debug/$FAILTYPE/space 282 282 echo 2 > /sys/kernel/debug/$FAILTYPE/verbose 283 - echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait 283 + echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait 284 284 285 285 faulty_system() 286 286 { ··· 334 334 printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times 335 335 echo 0 > /sys/kernel/debug/$FAILTYPE/space 336 336 echo 2 > /sys/kernel/debug/$FAILTYPE/verbose 337 - echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait 338 - echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-highmem 337 + echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait 338 + echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-highmem 339 339 echo 10 > /sys/kernel/debug/$FAILTYPE/stacktrace-depth 340 340 341 341 trap "echo 0 > /sys/kernel/debug/$FAILTYPE/probability" SIGINT SIGTERM EXIT