mm, hwpoison: Add comment describing when to add new cases
Subsystems (2)
PATCH 1/1 mm, hwpoison: Add comment describing when to add new cases
From: Andi Kleen <[email protected]>
Here's another comment fix for hwpoison.
It describes the "guiding principle" on when to add new memory error recovery code.
--- mm/memory-failure.c | 7 +++++++ 1 file changed, 7 insertions(+)
mm/memory-failure.c +7 -0
@@ -20,6 +20,13 @@* this code has to be extremely careful. Generally it tries to use * normal locking rules, as in get the standard locks, even if that means * the error handling takes potentially a long time. +* +* It can be very tempting to add handling for obscure cases here. +* In general any code for handling new cases should only be added if: +* - You know how to test it. +* - You have a test that can be added to mce-test +* - The case actually shows up as a frequent (top 10) page state in +* tools/vm/page-types when running a real workload. * * There are several operations here with exponential complexity because * of unsuitable VM data structures. For example the operation to map back
Signature · 7 lines
1.9.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Andrew Morton
maintainerQuoted 17 lines · On Tue, 21 Apr 2015 11:11:30 -0700 Andi Kleen <[email protected]> wrote:
From: Andi Kleen <[email protected]>
Here's another comment fix for hwpoison.
It describes the "guiding principle" on when to add new memory error recovery code.
Signed-off-by Andi Kleen <[email protected]>--- mm/memory-failure.c | 7 +++++++ 1 file changed, 7 insertions(+)mm/memory-failure.c +0
-0
mm/memory-failure.c line 27
Quoted 8 lines
mm/memory-failure.c +5
-0@@ -20,6 +20,13 @@* this code has to be extremely careful. Generally it tries to use * normal locking rules, as in get the standard locks, even if that means * the error handling takes potentially a long time. +* +* It can be very tempting to add handling for obscure cases here. +* In general any code for handling new cases should only be added if: +* - You know how to test it. +* - You have a test that can be added to mce-test
Some additional details on mce-test might be useful. The goog leads me to https://github.com/andikleen/mce-test but that hasn't been touched in 3 years?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 9 lines
Quoted 5 lines
+ *
+ * It can be very tempting to add handling for obscure cases here.
+ * In general any code for handling new cases should only be added if:
+ * - You know how to test it.
+ * - You have a test that can be added to mce-testSome additional details on mce-test might be useful. The goog leads me to https://github.com/andikleen/mce-test but that hasn't been touched in 3 years?
The latest version is here https://git.kernel.org/cgit/utils/cpu/mce/mce-test.git/
Will send a new patch.
-Andi
Signature · 7 lines
[email protected] -- Speaking for myself only -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 8 lines · Andi Kleen
From: Andi Kleen <[email protected]>
Here's another comment fix for hwpoison.
It describes the "guiding principle" on when to add new memory error recovery code.
Signed-off-by Andi Kleen <[email protected]>
Quoted 25 lines
--- mm/memory-failure.c | 7 +++++++ 1 file changed, 7 insertions(+)mm/memory-failure.c +7
-0@@ -20,6 +20,13 @@* this code has to be extremely careful. Generally it tries to use * normal locking rules, as in get the standard locks, even if that means * the error handling takes potentially a long time. +* +* It can be very tempting to add handling for obscure cases here. +* In general any code for handling new cases should only be added if: +* - You know how to test it. +* - You have a test that can be added to mce-test +* - The case actually shows up as a frequent (top 10) page state in +* tools/vm/page-types when running a real workload. * * There are several operations here with exponential complexity because * of unsuitable VM data structures. For example the operation to map back Signature · 1 line
1.9.3
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>