Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1200311

Re: [PATCH] memory-failure/hwpoison_user_mappings: move the comment about swap cache pages' check to proper location

From Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Newsgroups linux.kernel
Subject Re: [PATCH] memory-failure/hwpoison_user_mappings: move the comment about swap cache pages' check to proper location
Date 2015-08-05 01:10 +0200
Message-ID <pTTvk-8pp-39@gated-at.bofh.it> (permalink)
References <pTJvX-1ZY-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] memory-failure/hwpoison_user_mappings: move the comment  about swap cache pages' check to proper location Wang Xiaoqiang <wangxq10@lzu.edu.cn> - 2015-08-04 14:30 +0200
  Re: [PATCH] memory-failure/hwpoison_user_mappings: move the comment  about swap cache pages' check to proper location Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> - 2015-08-05 01:10 +0200

csiph-web