Commit 1c80b990 authored by Andi Kleen's avatar Andi Kleen

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: default avatarAndi Kleen <ak@linux.intel.com>
parent 6b0cd00b
...@@ -7,21 +7,26 @@ ...@@ -7,21 +7,26 @@
* Free Software Foundation. * Free Software Foundation.
* *
* High level machine check handler. Handles pages reported by the * High level machine check handler. Handles pages reported by the
* hardware as being corrupted usually due to a 2bit ECC memory or cache * hardware as being corrupted usually due to a multi-bit ECC memory or cache
* failure. * failure.
* *
* In addition there is a "soft offline" entry point that allows stop using
* not-yet-corrupted-by-suspicious pages without killing anything.
*
* Handles page cache pages in various states. The tricky part * Handles page cache pages in various states. The tricky part
* here is that we can access any page asynchronous to other VM * here is that we can access any page asynchronously in respect to
* users, because memory failures could happen anytime and anywhere, * other VM users, because memory failures could happen anytime and
* possibly violating some of their assumptions. This is why this code * anywhere. This could violate some of their assumptions. This is why
* has to be extremely careful. Generally it tries to use normal locking * this code has to be extremely careful. Generally it tries to use
* rules, as in get the standard locks, even if that means the * normal locking rules, as in get the standard locks, even if that means
* error handling takes potentially a long time. * the error handling takes potentially a long time.
* *
* The operation to map back from RMAP chains to processes has to walk * There are several operations here with exponential complexity because
* the complete process list and has non linear complexity with the number * of unsuitable VM data structures. For example the operation to map back
* mappings. In short it can be quite slow. But since memory corruptions * from RMAP chains to processes has to walk the complete process list and
* are rare we hope to get away with this. * has non linear complexity with the number. But since memory corruptions
* are rare we hope to get away with this. This avoids impacting the core
* VM.
*/ */
/* /*
...@@ -78,7 +83,7 @@ static int hwpoison_filter_dev(struct page *p) ...@@ -78,7 +83,7 @@ static int hwpoison_filter_dev(struct page *p)
return 0; return 0;
/* /*
* page_mapping() does not accept slab page * page_mapping() does not accept slab pages.
*/ */
if (PageSlab(p)) if (PageSlab(p))
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment