From: Naoya Horiguchi <[email protected]>
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 <[email protected]>
Signed-off-by: Naoya Horiguchi <[email protected]>
---
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
Hi:
On 2022/1/25 10:56, Naoya Horiguchi wrote:
> From: Naoya Horiguchi <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: Naoya Horiguchi <[email protected]>
> ---
> 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 <[email protected]>
On 1/25/22 8:26 AM, Naoya Horiguchi wrote:
> From: Naoya Horiguchi <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: Naoya Horiguchi <[email protected]>
> ---
> 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 <[email protected]>
On 2022-01-25 03:56, Naoya Horiguchi wrote:
> From: Naoya Horiguchi <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: Naoya Horiguchi <[email protected]>
Reviewed-by: Oscar Salvador <[email protected]>
--
Oscar Salvador
SUSE Labs
On Mon, Jan 24, 2022 at 6:56 PM Naoya Horiguchi
<[email protected]> wrote:
>
> From: Naoya Horiguchi <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: Naoya Horiguchi <[email protected]>
Reviewed-by: Yang Shi <[email protected]>
> ---
> 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
>
>