All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Jinjiang Tu <tujinjiang@huawei.com>,
	akpm@linux-foundation.org, linmiaohe@huawei.com,
	nao.horiguchi@gmail.com
Cc: linux-mm@kvack.org, wangkefeng.wang@huawei.com, sunnanyong@huawei.com
Subject: Re: [PATCH 1/2] mm/hwpoison: introduce folio_contain_hwpoisoned_page() helper
Date: Tue, 1 Apr 2025 18:28:57 +0200	[thread overview]
Message-ID: <54e3d2a2-e29a-464e-a34e-e2702280f169@redhat.com> (raw)
In-Reply-To: <20250318083939.987651-2-tujinjiang@huawei.com>

On 18.03.25 09:39, Jinjiang Tu wrote:
> Introduce helper folio_contain_hwpoisoned_page() to check if the entire
> folio is hwpoisoned or it contains hwpoisoned pages.
> 
> Signed-off-by: Jinjiang Tu <tujinjiang@huawei.com>
> ---
>   include/linux/page-flags.h | 6 ++++++
>   mm/memory_hotplug.c        | 3 +--
>   mm/shmem.c                 | 3 +--
>   3 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
> index 36d283552f80..be2f0017a667 100644
> --- a/include/linux/page-flags.h
> +++ b/include/linux/page-flags.h
> @@ -1104,6 +1104,12 @@ static inline bool is_page_hwpoison(const struct page *page)
>   	return folio_test_hugetlb(folio) && PageHWPoison(&folio->page);
>   }
>   
> +static inline bool folio_contain_hwpoisoned_page(struct folio *folio)

"folio_contains_hwpoisoned_page"

Also make sure to indent

	return folio_test_hwpoison(folio) ||
	       (folio_test_large(folio) && folio_test_has_hwpoisoned(folio));
	       ^ this way

With that

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

-- 
Cheers,

David / dhildenb



  parent reply	other threads:[~2025-04-01 16:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18  8:39 [PATCH 0/2] mm/vmscan: don't try to reclaim hwpoison folio Jinjiang Tu
2025-03-18  8:39 ` [PATCH 1/2] mm/hwpoison: introduce folio_contain_hwpoisoned_page() helper Jinjiang Tu
2025-03-20  2:36   ` Miaohe Lin
2025-04-01 16:28   ` David Hildenbrand [this message]
2025-03-18  8:39 ` [PATCH 2/2] mm/vmscan: don't try to reclaim hwpoison folio Jinjiang Tu
2025-03-20  2:50   ` Miaohe Lin
2025-03-20  3:37     ` Jinjiang Tu
2025-04-01 16:36   ` David Hildenbrand

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=54e3d2a2-e29a-464e-a34e-e2702280f169@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-mm@kvack.org \
    --cc=nao.horiguchi@gmail.com \
    --cc=sunnanyong@huawei.com \
    --cc=tujinjiang@huawei.com \
    --cc=wangkefeng.wang@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.