linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] mm, hwpoison: remove obsolete comment
@ 2022-01-25  2:56 Naoya Horiguchi
  2022-01-25  3:08 ` Miaohe Lin
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Naoya Horiguchi @ 2022-01-25  2:56 UTC (permalink / raw)
  To: linux-mm
  Cc: Andrew Morton, Mike Kravetz, Tony Luck, Naoya Horiguchi, linux-kernel

From: Naoya Horiguchi <naoya.horiguchi@nec.com>

With the introduction of mf_mutex, most of memory error handling
process is mutually exclusive, so the in-line comment about
subtlety about double-checking PageHWPoison is no more correct.
So remove it.

Suggested-by: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
---
 mm/memory-failure.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 4c9bd1d37301..a6a1e02759e7 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -2146,12 +2146,6 @@ static int __soft_offline_page(struct page *page)
 		.gfp_mask = GFP_USER | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL,
 	};
 
-	/*
-	 * Check PageHWPoison again inside page lock because PageHWPoison
-	 * is set by memory_failure() outside page lock. Note that
-	 * memory_failure() also double-checks PageHWPoison inside page lock,
-	 * so there's no race between soft_offline_page() and memory_failure().
-	 */
 	lock_page(page);
 	if (!PageHuge(page))
 		wait_on_page_writeback(page);
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] mm, hwpoison: remove obsolete comment
  2022-01-25  2:56 [PATCH v1] mm, hwpoison: remove obsolete comment Naoya Horiguchi
@ 2022-01-25  3:08 ` Miaohe Lin
  2022-01-25  5:44 ` Anshuman Khandual
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Miaohe Lin @ 2022-01-25  3:08 UTC (permalink / raw)
  To: Naoya Horiguchi
  Cc: Andrew Morton, Mike Kravetz, Tony Luck, Naoya Horiguchi,
	linux-kernel, Linux-MM

Hi:
On 2022/1/25 10:56, Naoya Horiguchi wrote:
> From: Naoya Horiguchi <naoya.horiguchi@nec.com>
> 
> With the introduction of mf_mutex, most of memory error handling
> process is mutually exclusive, so the in-line comment about
> subtlety about double-checking PageHWPoison is no more correct.
> So remove it.
> 
> Suggested-by: Mike Kravetz <mike.kravetz@oracle.com>
> Signed-off-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
> ---
>  mm/memory-failure.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 4c9bd1d37301..a6a1e02759e7 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -2146,12 +2146,6 @@ static int __soft_offline_page(struct page *page)
>  		.gfp_mask = GFP_USER | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL,
>  	};
>  
> -	/*
> -	 * Check PageHWPoison again inside page lock because PageHWPoison
> -	 * is set by memory_failure() outside page lock. Note that
> -	 * memory_failure() also double-checks PageHWPoison inside page lock,
> -	 * so there's no race between soft_offline_page() and memory_failure().
> -	 */
>  	lock_page(page);
>  	if (!PageHuge(page))
>  		wait_on_page_writeback(page);
> 

Looks good to me. Thanks for the patch.

Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] mm, hwpoison: remove obsolete comment
  2022-01-25  2:56 [PATCH v1] mm, hwpoison: remove obsolete comment Naoya Horiguchi
  2022-01-25  3:08 ` Miaohe Lin
@ 2022-01-25  5:44 ` Anshuman Khandual
  2022-01-25  6:18 ` Oscar Salvador
  2022-01-25 17:45 ` Yang Shi
  3 siblings, 0 replies; 5+ messages in thread
From: Anshuman Khandual @ 2022-01-25  5:44 UTC (permalink / raw)
  To: Naoya Horiguchi, linux-mm
  Cc: Andrew Morton, Mike Kravetz, Tony Luck, Naoya Horiguchi, linux-kernel



On 1/25/22 8:26 AM, Naoya Horiguchi wrote:
> From: Naoya Horiguchi <naoya.horiguchi@nec.com>
> 
> With the introduction of mf_mutex, most of memory error handling
> process is mutually exclusive, so the in-line comment about
> subtlety about double-checking PageHWPoison is no more correct.
> So remove it.
> 
> Suggested-by: Mike Kravetz <mike.kravetz@oracle.com>
> Signed-off-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
> ---
>  mm/memory-failure.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 4c9bd1d37301..a6a1e02759e7 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -2146,12 +2146,6 @@ static int __soft_offline_page(struct page *page)
>  		.gfp_mask = GFP_USER | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL,
>  	};
>  
> -	/*
> -	 * Check PageHWPoison again inside page lock because PageHWPoison
> -	 * is set by memory_failure() outside page lock. Note that
> -	 * memory_failure() also double-checks PageHWPoison inside page lock,
> -	 * so there's no race between soft_offline_page() and memory_failure().
> -	 */
>  	lock_page(page);
>  	if (!PageHuge(page))
>  		wait_on_page_writeback(page);
> 

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] mm, hwpoison: remove obsolete comment
  2022-01-25  2:56 [PATCH v1] mm, hwpoison: remove obsolete comment Naoya Horiguchi
  2022-01-25  3:08 ` Miaohe Lin
  2022-01-25  5:44 ` Anshuman Khandual
@ 2022-01-25  6:18 ` Oscar Salvador
  2022-01-25 17:45 ` Yang Shi
  3 siblings, 0 replies; 5+ messages in thread
From: Oscar Salvador @ 2022-01-25  6:18 UTC (permalink / raw)
  To: Naoya Horiguchi
  Cc: linux-mm, Andrew Morton, Mike Kravetz, Tony Luck,
	Naoya Horiguchi, linux-kernel

On 2022-01-25 03:56, Naoya Horiguchi wrote:
> From: Naoya Horiguchi <naoya.horiguchi@nec.com>
> 
> With the introduction of mf_mutex, most of memory error handling
> process is mutually exclusive, so the in-line comment about
> subtlety about double-checking PageHWPoison is no more correct.
> So remove it.
> 
> Suggested-by: Mike Kravetz <mike.kravetz@oracle.com>
> Signed-off-by: Naoya Horiguchi <naoya.horiguchi@nec.com>

Reviewed-by: Oscar Salvador <osalvador@suse.de>


-- 
Oscar Salvador
SUSE Labs


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] mm, hwpoison: remove obsolete comment
  2022-01-25  2:56 [PATCH v1] mm, hwpoison: remove obsolete comment Naoya Horiguchi
                   ` (2 preceding siblings ...)
  2022-01-25  6:18 ` Oscar Salvador
@ 2022-01-25 17:45 ` Yang Shi
  3 siblings, 0 replies; 5+ messages in thread
From: Yang Shi @ 2022-01-25 17:45 UTC (permalink / raw)
  To: Naoya Horiguchi
  Cc: Linux MM, Andrew Morton, Mike Kravetz, Tony Luck,
	Naoya Horiguchi, Linux Kernel Mailing List

On Mon, Jan 24, 2022 at 6:56 PM Naoya Horiguchi
<naoya.horiguchi@linux.dev> wrote:
>
> From: Naoya Horiguchi <naoya.horiguchi@nec.com>
>
> With the introduction of mf_mutex, most of memory error handling
> process is mutually exclusive, so the in-line comment about
> subtlety about double-checking PageHWPoison is no more correct.
> So remove it.
>
> Suggested-by: Mike Kravetz <mike.kravetz@oracle.com>
> Signed-off-by: Naoya Horiguchi <naoya.horiguchi@nec.com>

Reviewed-by: Yang Shi <shy828301@gmail.com>

> ---
>  mm/memory-failure.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 4c9bd1d37301..a6a1e02759e7 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -2146,12 +2146,6 @@ static int __soft_offline_page(struct page *page)
>                 .gfp_mask = GFP_USER | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL,
>         };
>
> -       /*
> -        * Check PageHWPoison again inside page lock because PageHWPoison
> -        * is set by memory_failure() outside page lock. Note that
> -        * memory_failure() also double-checks PageHWPoison inside page lock,
> -        * so there's no race between soft_offline_page() and memory_failure().
> -        */
>         lock_page(page);
>         if (!PageHuge(page))
>                 wait_on_page_writeback(page);
> --
> 2.25.1
>
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-25 17:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25  2:56 [PATCH v1] mm, hwpoison: remove obsolete comment Naoya Horiguchi
2022-01-25  3:08 ` Miaohe Lin
2022-01-25  5:44 ` Anshuman Khandual
2022-01-25  6:18 ` Oscar Salvador
2022-01-25 17:45 ` Yang Shi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).