* [PATCH] memory-failure/hwpoison_user_mappings: move the comment about swap cache pages' check to proper location
@ 2015-08-04 12:20 Wang Xiaoqiang
2015-08-04 23:05 ` Naoya Horiguchi
0 siblings, 1 reply; 2+ messages in thread
From: Wang Xiaoqiang @ 2015-08-04 12:20 UTC (permalink / raw)
To: Naoya Horiguchi; +Cc: linux-kernel, linux-mm
Hi Naoya,
This patch just move the comment about swap cache pages' check to the
proper location in 'hwpoison_user_mappings' function.
Signed-off-by: Wang Xiaoqiang <wangxq10@lzu.edu.cn>
---
mm/memory-failure.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 1cf7f29..3253abb 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -945,10 +945,6 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
if (!(PageLRU(hpage) || PageHuge(p)))
return SWAP_SUCCESS;
- /*
- * This check implies we don't kill processes if their pages
- * are in the swap cache early. Those are always late kills.
- */
if (!page_mapped(hpage))
return SWAP_SUCCESS;
@@ -957,6 +953,10 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
return SWAP_FAIL;
}
+ /*
+ * This check implies we don't kill processes if their pages
+ * are in the swap cache early. Those are always late kills.
+ */
if (PageSwapCache(p)) {
printk(KERN_ERR
"MCE %#lx: keeping poisoned page in swap cache\n", pfn);
--
1.7.10.4
--
thx!
Wang Xiaoqiang
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] memory-failure/hwpoison_user_mappings: move the comment about swap cache pages' check to proper location
2015-08-04 12:20 [PATCH] memory-failure/hwpoison_user_mappings: move the comment about swap cache pages' check to proper location Wang Xiaoqiang
@ 2015-08-04 23:05 ` Naoya Horiguchi
0 siblings, 0 replies; 2+ messages in thread
From: Naoya Horiguchi @ 2015-08-04 23:05 UTC (permalink / raw)
To: Wang Xiaoqiang; +Cc: linux-kernel, linux-mm
On Tue, Aug 04, 2015 at 08:20:38PM +0800, Wang Xiaoqiang wrote:
> Hi Naoya,
>
> This patch just move the comment about swap cache pages' check to the
> proper location in 'hwpoison_user_mappings' function.
>
> Signed-off-by: Wang Xiaoqiang <wangxq10@lzu.edu.cn>
Thank you for finding out this.
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> ---
> mm/memory-failure.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 1cf7f29..3253abb 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -945,10 +945,6 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
> if (!(PageLRU(hpage) || PageHuge(p)))
> return SWAP_SUCCESS;
>
> - /*
> - * This check implies we don't kill processes if their pages
> - * are in the swap cache early. Those are always late kills.
> - */
> if (!page_mapped(hpage))
> return SWAP_SUCCESS;
>
> @@ -957,6 +953,10 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
> return SWAP_FAIL;
> }
>
> + /*
> + * This check implies we don't kill processes if their pages
> + * are in the swap cache early. Those are always late kills.
> + */
> if (PageSwapCache(p)) {
> printk(KERN_ERR
> "MCE %#lx: keeping poisoned page in swap cache\n", pfn);
> --
> 1.7.10.4
>
>
>
> --
> thx!
> Wang Xiaoqiang
>
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-04 23:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-04 12:20 [PATCH] memory-failure/hwpoison_user_mappings: move the comment about swap cache pages' check to proper location Wang Xiaoqiang
2015-08-04 23:05 ` Naoya Horiguchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox