All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] docs: fault-injection: fix defaults
@ 2022-04-05  9:54 Dylan Yudaken
  2022-04-07  2:23 ` Akinobu Mita
  0 siblings, 1 reply; 3+ messages in thread
From: Dylan Yudaken @ 2022-04-05  9:54 UTC (permalink / raw)
  To: Akinobu Mita, Jonathan Corbet, linux-doc; +Cc: Dylan Yudaken

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>
---

v2: reword the docs to explain what happens if 'N' is set.

 Documentation/fault-injection/fault-injection.rst | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Documentation/fault-injection/fault-injection.rst b/Documentation/fault-injection/fault-injection.rst
index 4a25c5eb6f07..eb9c2d9a4f5f 100644
--- a/Documentation/fault-injection/fault-injection.rst
+++ b/Documentation/fault-injection/fault-injection.rst
@@ -132,16 +132,16 @@ configuration of fault-injection capabilities.
 
 	Format: { 'Y' | 'N' }
 
-	default is 'N', setting it to 'Y' won't inject failures into
-	highmem/user allocations.
+	default is 'Y', setting it to 'N' will also inject failures into
+	highmem/user allocations (__GFP_HIGHMEM allocations).
 
 - /sys/kernel/debug/failslab/ignore-gfp-wait:
 - /sys/kernel/debug/fail_page_alloc/ignore-gfp-wait:
 
 	Format: { 'Y' | 'N' }
 
-	default is 'N', setting it to 'Y' will inject failures
-	only into non-sleep allocations (GFP_ATOMIC allocations).
+	default is 'Y', setting it to 'N' will also inject failures
+	into allocations that can sleep (__GFP_DIRECT_RECLAIM allocations).
 
 - /sys/kernel/debug/fail_page_alloc/min-order:
 
@@ -280,7 +280,7 @@ Application Examples
     printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times
     echo 0 > /sys/kernel/debug/$FAILTYPE/space
     echo 2 > /sys/kernel/debug/$FAILTYPE/verbose
-    echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
+    echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
 
     faulty_system()
     {
@@ -334,8 +334,8 @@ Application Examples
     printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times
     echo 0 > /sys/kernel/debug/$FAILTYPE/space
     echo 2 > /sys/kernel/debug/$FAILTYPE/verbose
-    echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
-    echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-highmem
+    echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
+    echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-highmem
     echo 10 > /sys/kernel/debug/$FAILTYPE/stacktrace-depth
 
     trap "echo 0 > /sys/kernel/debug/$FAILTYPE/probability" SIGINT SIGTERM EXIT
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] docs: fault-injection: fix defaults
  2022-04-05  9:54 [PATCH v2] docs: fault-injection: fix defaults Dylan Yudaken
@ 2022-04-07  2:23 ` Akinobu Mita
  2022-04-16  8:47   ` Jonathan Corbet
  0 siblings, 1 reply; 3+ messages in thread
From: Akinobu Mita @ 2022-04-07  2:23 UTC (permalink / raw)
  To: Dylan Yudaken; +Cc: Jonathan Corbet, linux-doc

2022年4月5日(火) 18:54 Dylan Yudaken <dylany@fb.com>:
>
> 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>

Looks good.

Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] docs: fault-injection: fix defaults
  2022-04-07  2:23 ` Akinobu Mita
@ 2022-04-16  8:47   ` Jonathan Corbet
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2022-04-16  8:47 UTC (permalink / raw)
  To: Akinobu Mita, Dylan Yudaken; +Cc: linux-doc

Akinobu Mita <akinobu.mita@gmail.com> writes:

> 2022年4月5日(火) 18:54 Dylan Yudaken <dylany@fb.com>:
>>
>> 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>
>
> Looks good.
>
> Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>

Applied, thanks.

I'm thinking, now that I look, that this documentation really belongs in
the dev-tools book; any objections to moving it?

jon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-16  8:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05  9:54 [PATCH v2] docs: fault-injection: fix defaults Dylan Yudaken
2022-04-07  2:23 ` Akinobu Mita
2022-04-16  8:47   ` Jonathan Corbet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.