linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Naoya Horiguchi <naoya.horiguchi@linux.dev>, linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Tony Luck <tony.luck@intel.com>,
	Oscar Salvador <osalvador@suse.de>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	Michal Hocko <mhocko@suse.com>, Yang Shi <shy828301@gmail.com>,
	Naoya Horiguchi <naoya.horiguchi@nec.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] mm, hwpoison: add is_free_buddy_page() in HWPoisonHandlable()
Date: Fri, 10 Sep 2021 13:16:37 +0200	[thread overview]
Message-ID: <0363dc08-64af-8e59-7e1e-930194710e51@redhat.com> (raw)
In-Reply-To: <20210909004131.163221-1-naoya.horiguchi@linux.dev>

On 09.09.21 02:41, Naoya Horiguchi wrote:
> From: Naoya Horiguchi <naoya.horiguchi@nec.com>
> 
> commit fcc00621d88b ("mm/hwpoison: retry with shake_page() for
> unhandlable pages") changes the return value of __get_hwpoison_page() to
> retry for transiently unhandlable cases.  However, __get_hwpoison_page()
> currently fails to properly judge buddy pages as handlable, so hard/soft
> offline for buddy pages always fail as "unhandlable page".  This is
> totally regrettable.
> 
> So let's add is_free_buddy_page() in HWPoisonHandlable(), so that
> __get_hwpoison_page() returns different return values between buddy
> pages and unhandlable pages as intended.
> 
> Fixes: fcc00621d88b ("mm/hwpoison: retry with shake_page() for unhandlable pages")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
> ---
>   mm/memory-failure.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git v5.14-rc7-mmotm-2021-08-23-16-42/mm/memory-failure.c v5.14-rc7-mmotm-2021-08-23-16-42_patched/mm/memory-failure.c
> index 60df8fcd0444..3416c55be810 100644
> --- v5.14-rc7-mmotm-2021-08-23-16-42/mm/memory-failure.c
> +++ v5.14-rc7-mmotm-2021-08-23-16-42_patched/mm/memory-failure.c
> @@ -1126,7 +1126,7 @@ static int page_action(struct page_state *ps, struct page *p,
>    */
>   static inline bool HWPoisonHandlable(struct page *page)
>   {
> -	return PageLRU(page) || __PageMovable(page);
> +	return PageLRU(page) || __PageMovable(page) || is_free_buddy_page(page);
>   }
>   
>   static int __get_hwpoison_page(struct page *page)
> 

LGTM and I agree that code might desrve some cleanups.

Acked-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb



      parent reply	other threads:[~2021-09-10 11:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09  0:41 Naoya Horiguchi
2021-09-09  3:22 ` Yang Shi
2021-09-09  3:58   ` HORIGUCHI NAOYA(堀口 直也)
2021-09-10 11:16 ` David Hildenbrand [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0363dc08-64af-8e59-7e1e-930194710e51@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.com \
    --cc=naoya.horiguchi@linux.dev \
    --cc=naoya.horiguchi@nec.com \
    --cc=osalvador@suse.de \
    --cc=shy828301@gmail.com \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox