From: Matthew Wilcox <willy@infradead.org>
To: Jane Chu <jane.chu@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
stable@vger.kernel.org, muchun.song@linux.dev, osalvador@suse.de,
david@kernel.org, linmiaohe@huawei.com, jiaqiyan@google.com,
william.roche@oracle.com, rientjes@google.com,
akpm@linux-foundation.org, lorenzo.stoakes@oracle.com,
Liam.Howlett@oracle.com, rppt@kernel.org, surenb@google.com,
mhocko@suse.com
Subject: Re: [PATCH v2] mm/memory-failure: teach kill_accessing_process to accept hugetlb tail page pfn
Date: Fri, 19 Dec 2025 18:18:40 +0000 [thread overview]
Message-ID: <aUWXAGC1028jRKEY@casper.infradead.org> (raw)
In-Reply-To: <20251219175516.2656093-1-jane.chu@oracle.com>
On Fri, Dec 19, 2025 at 10:55:16AM -0700, Jane Chu wrote:
> static int check_hwpoisoned_entry(pte_t pte, unsigned long addr, short shift,
> - unsigned long poisoned_pfn, struct to_kill *tk)
> + unsigned long poisoned_pfn, struct to_kill *tk,
> + int pte_nr)
if we pass in huge_page_mask() instead ...
> {
> unsigned long pfn = 0;
> + unsigned long hwpoison_vaddr;
>
> if (pte_present(pte)) {
> pfn = pte_pfn(pte);
> @@ -694,10 +696,11 @@ static int check_hwpoisoned_entry(pte_t pte, unsigned long addr, short shift,
> pfn = swp_offset_pfn(swp);
> }
>
> - if (!pfn || pfn != poisoned_pfn)
> + if (!pfn || (pfn > poisoned_pfn || (pfn + pte_nr - 1) < poisoned_pfn))
... then we can simplify this to:
if (!pfn || ((pfn | mask) != (poisoned_pfn | mask))
> return 0;
> @@ -2037,6 +2038,7 @@ static int try_memory_failure_hugetlb(unsigned long pfn, int flags, int *hugetlb
> return action_result(pfn, MF_MSG_GET_HWPOISON, MF_IGNORED);
> }
>
> +
> folio = page_folio(p);
> folio_lock(folio);
unnecessary whitespace change
next prev parent reply other threads:[~2025-12-19 18:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 17:55 Jane Chu
2025-12-19 18:18 ` Matthew Wilcox [this message]
2025-12-22 20:30 ` jane.chu
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=aUWXAGC1028jRKEY@casper.infradead.org \
--to=willy@infradead.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=jane.chu@oracle.com \
--cc=jiaqiyan@google.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
--cc=rientjes@google.com \
--cc=rppt@kernel.org \
--cc=stable@vger.kernel.org \
--cc=surenb@google.com \
--cc=william.roche@oracle.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