linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sidhartha Kumar <sidhartha.kumar@oracle.com>
To: Ye Liu <ye.liu@linux.dev>, akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Ye Liu <liuye@kylinos.cn>
Subject: Re: [PATCH] mm/page_alloc: Replace flag check with PageHWPoison() in check_new_page_bad()
Date: Thu, 20 Mar 2025 10:41:28 -0500	[thread overview]
Message-ID: <dc37ed50-2739-4e51-88d0-b8d429ba2530@oracle.com> (raw)
In-Reply-To: <20250320063346.489030-1-ye.liu@linux.dev>

On 3/20/25 2:33 AM, Ye Liu wrote:
> From: Ye Liu <liuye@kylinos.cn>
> 
> This patch replaces the direct check for the __PG_HWPOISON flag with
> the PageHWPoison() macro, improving code readability and maintaining
> consistency with other parts of the memory management code.
> 
> Signed-off-by: Ye Liu <liuye@kylinos.cn>
> ---
>   mm/page_alloc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index fe76fd237dd0..6ef54abebf51 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -1427,7 +1427,7 @@ static __always_inline void page_del_and_expand(struct zone *zone,
>   
>   static void check_new_page_bad(struct page *page)
>   {
> -	if (unlikely(page->flags & __PG_HWPOISON)) {
> +	if (unlikely(PageHWPoison(page))) {
>   		/* Don't complain about hwpoisoned pages */
>   		if (PageBuddy(page))
>   			__ClearPageBuddy(page);

Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>


  reply	other threads:[~2025-03-20 15:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20  6:33 Ye Liu
2025-03-20 15:41 ` Sidhartha Kumar [this message]
2025-03-21  4:48 ` Anshuman Khandual

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=dc37ed50-2739-4e51-88d0-b8d429ba2530@oracle.com \
    --to=sidhartha.kumar@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liuye@kylinos.cn \
    --cc=ye.liu@linux.dev \
    /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