Commit 1c80b990a3411733890eff10817e388d5e25e2dd
1 parent
6b0cd00bc3
Exists in
master
and in
4 other branches
HWPOISON: Improve comments in memory-failure.c
Clean up and improve the overview comment in memory-failure.c Tidy some grammar issues in other comments. Signed-off-by: Andi Kleen <ak@linux.intel.com>
Showing 1 changed file with 18 additions and 13 deletions Side-by-side Diff
mm/memory-failure.c
... | ... | @@ -7,21 +7,26 @@ |
7 | 7 | * Free Software Foundation. |
8 | 8 | * |
9 | 9 | * High level machine check handler. Handles pages reported by the |
10 | - * hardware as being corrupted usually due to a 2bit ECC memory or cache | |
10 | + * hardware as being corrupted usually due to a multi-bit ECC memory or cache | |
11 | 11 | * failure. |
12 | + * | |
13 | + * In addition there is a "soft offline" entry point that allows stop using | |
14 | + * not-yet-corrupted-by-suspicious pages without killing anything. | |
12 | 15 | * |
13 | 16 | * Handles page cache pages in various states. The tricky part |
14 | - * here is that we can access any page asynchronous to other VM | |
15 | - * users, because memory failures could happen anytime and anywhere, | |
16 | - * possibly violating some of their assumptions. This is why this code | |
17 | - * has to be extremely careful. Generally it tries to use normal locking | |
18 | - * rules, as in get the standard locks, even if that means the | |
19 | - * error handling takes potentially a long time. | |
20 | - * | |
21 | - * The operation to map back from RMAP chains to processes has to walk | |
22 | - * the complete process list and has non linear complexity with the number | |
23 | - * mappings. In short it can be quite slow. But since memory corruptions | |
24 | - * are rare we hope to get away with this. | |
17 | + * here is that we can access any page asynchronously in respect to | |
18 | + * other VM users, because memory failures could happen anytime and | |
19 | + * anywhere. This could violate some of their assumptions. This is why | |
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 | |
22 | + * the error handling takes potentially a long time. | |
23 | + * | |
24 | + * There are several operations here with exponential complexity because | |
25 | + * of unsuitable VM data structures. For example the operation to map back | |
26 | + * from RMAP chains to processes has to walk the complete process list and | |
27 | + * has non linear complexity with the number. But since memory corruptions | |
28 | + * are rare we hope to get away with this. This avoids impacting the core | |
29 | + * VM. | |
25 | 30 | */ |
26 | 31 | |
27 | 32 | /* |
... | ... | @@ -78,7 +83,7 @@ |
78 | 83 | return 0; |
79 | 84 | |
80 | 85 | /* |
81 | - * page_mapping() does not accept slab page | |
86 | + * page_mapping() does not accept slab pages. | |
82 | 87 | */ |
83 | 88 | if (PageSlab(p)) |
84 | 89 | return -EINVAL; |