linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jiaqi Yan <jiaqiyan@google.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: jackmanb@google.com, hannes@cmpxchg.org, linmiaohe@huawei.com,
	 ziy@nvidia.com, harry.yoo@oracle.com, nao.horiguchi@gmail.com,
	 david@redhat.com, lorenzo.stoakes@oracle.com,
	william.roche@oracle.com,  tony.luck@intel.com,
	wangkefeng.wang@huawei.com, jane.chu@oracle.com,
	 akpm@linux-foundation.org, osalvador@suse.de,
	muchun.song@linux.dev,  rientjes@google.com, duenwen@google.com,
	jthoughton@google.com,  linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, Liam.Howlett@oracle.com,
	 vbabka@suse.cz, rppt@kernel.org, surenb@google.com,
	mhocko@suse.com
Subject: Re: [PATCH v2 3/3] mm/memory-failure: simplify __page_handle_poison
Date: Mon, 22 Dec 2025 15:13:00 -0800	[thread overview]
Message-ID: <CACw3F50ZKCGaQrOEgoH6g8YCcK7Fs=tEiywZhqUzqkkeV_SsVg@mail.gmail.com> (raw)
In-Reply-To: <aUnCUNjiBOp05kVD@casper.infradead.org>

On Mon, Dec 22, 2025 at 2:12 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Fri, Dec 19, 2025 at 06:33:46PM +0000, Jiaqi Yan wrote:
> > Now that no HWPoison page will be given away to buddy allocator
> > at the end of dissolve_free_hugetlb_folio, there is no need to
> > drain_all_pages and take_page_off_buddy anymore, so remove them.
>
> What if we discover a hardware error in a page which is currently
> in the buddy system?  Why don't we need to remove that page from the
> buddy system?

Thanks for your comment.

memory_failure() explicitly handles is_free_buddy_page() case and is
removing from buddy allocator with take_page_off_buddy() directly.

However, when soft_offline_page() handles free page with
page_handle_poison(), removing from buddy allocator is missing with
this patch.

I will fix this in v3. One way is to split hugepage_or_freepage and
only take_page_off_buddy() for non-huge free page.


  reply	other threads:[~2025-12-22 23:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-19 18:33 [PATCH v2 0/3] Only free healthy pages in high-order HWPoison folio Jiaqi Yan
2025-12-19 18:33 ` [PATCH v2 1/3] mm/memory-failure: set has_hwpoisoned flags on HugeTLB folio Jiaqi Yan
2025-12-19 18:33 ` [PATCH v2 2/3] mm/page_alloc: only free healthy pages in high-order HWPoison folio Jiaqi Yan
2025-12-23  5:14   ` Harry Yoo
2025-12-27  1:50     ` Jiaqi Yan
2025-12-29  1:15       ` Harry Yoo
2025-12-31  0:19         ` Jiaqi Yan
2025-12-31  4:37           ` Harry Yoo
2025-12-23  7:45   ` Miaohe Lin
2025-12-27  1:50     ` Jiaqi Yan
2025-12-19 18:33 ` [PATCH v2 3/3] mm/memory-failure: simplify __page_handle_poison Jiaqi Yan
2025-12-22 22:12   ` Matthew Wilcox
2025-12-22 23:13     ` Jiaqi Yan [this message]
2025-12-22 22:06 ` [PATCH v2 0/3] Only free healthy pages in high-order HWPoison folio Jiaqi Yan

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='CACw3F50ZKCGaQrOEgoH6g8YCcK7Fs=tEiywZhqUzqkkeV_SsVg@mail.gmail.com' \
    --to=jiaqiyan@google.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=duenwen@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=harry.yoo@oracle.com \
    --cc=jackmanb@google.com \
    --cc=jane.chu@oracle.com \
    --cc=jthoughton@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=nao.horiguchi@gmail.com \
    --cc=osalvador@suse.de \
    --cc=rientjes@google.com \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=tony.luck@intel.com \
    --cc=vbabka@suse.cz \
    --cc=wangkefeng.wang@huawei.com \
    --cc=william.roche@oracle.com \
    --cc=willy@infradead.org \
    --cc=ziy@nvidia.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