diff options
author | Andi Kleen <ak@linux.intel.com> | 2015-06-24 19:56:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-24 20:49:41 -0400 |
commit | e0de78dfb4655752897d123a8cce6ecab4175dc9 (patch) | |
tree | 47a221a7054d0ff08895bb8aad55ff7940d2efe9 | |
parent | 1ed58b6051b67e5cfe9e465fb60bf7d5f55e0a64 (diff) |
mm, hwpoison: add comment describing when to add new cases
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 <ak@linux.intel.com>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/memory-failure.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 501820c815b3..dfa9dd7f1aea 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -20,6 +20,14 @@ | |||
20 | * this code has to be extremely careful. Generally it tries to use | 20 | * this code has to be extremely careful. Generally it tries to use |
21 | * normal locking rules, as in get the standard locks, even if that means | 21 | * normal locking rules, as in get the standard locks, even if that means |
22 | * the error handling takes potentially a long time. | 22 | * the error handling takes potentially a long time. |
23 | * | ||
24 | * It can be very tempting to add handling for obscure cases here. | ||
25 | * In general any code for handling new cases should only be added iff: | ||
26 | * - You know how to test it. | ||
27 | * - You have a test that can be added to mce-test | ||
28 | * https://git.kernel.org/cgit/utils/cpu/mce/mce-test.git/ | ||
29 | * - The case actually shows up as a frequent (top 10) page state in | ||
30 | * tools/vm/page-types when running a real workload. | ||
23 | * | 31 | * |
24 | * There are several operations here with exponential complexity because | 32 | * There are several operations here with exponential complexity because |
25 | * of unsuitable VM data structures. For example the operation to map back | 33 | * of unsuitable VM data structures. For example the operation to map back |