From: Miaohe Lin <linmiaohe@huawei.com>
To: Oscar Salvador <osalvador@suse.de>
Cc: <akpm@linux-foundation.org>, <naoya.horiguchi@nec.com>,
<linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/memory-failure: fix deadlock when hugetlb_optimize_vmemmap is enabled
Date: Thu, 11 Apr 2024 10:26:44 +0800 [thread overview]
Message-ID: <247259aa-9c78-d1ae-c829-aa72adc75922@huawei.com> (raw)
In-Reply-To: <ZhZTZtzyMpMMowoD@localhost.localdomain>
On 2024/4/10 16:52, Oscar Salvador wrote:
> On Wed, Apr 10, 2024 at 03:52:14PM +0800, Miaohe Lin wrote:
>> AFAICS, iff check_pages_enabled static key is enabled and in hard offline mode,
>> check_new_pages() will prevent those pages from ending up in a PCP queue again
>> when refilling PCP list. Because PageHWPoison pages will be taken as 'bad' pages
>> and skipped when refill PCP list.
>
> Yes, but check_pages_enabled static key is only enabled when
> either CONFIG_DEBUG_PAGEALLOC or CONFIG_DEBUG_VM are set, which means
> that under most of the systems that protection will not take place.
>
> Which takes me to a problem we had in the past where we were handing
> over hwpoisoned pages from PCP lists happily.
> Now, with for soft-offline mode, we worked hard to stop doing that
> because soft-offline is a non-disruptive operation and no one should get
> killed.
> hard-offline is another story, but still I think that extending the
> comment to include the following would be a good idea:
>
> "Disabling pcp before dissolving the page was a deterministic approach
> because we made sure that those pages cannot end up in any PCP list.
> Draining PCP lists expels those pages to the buddy system, but nothing
> guarantees that those pages do not get back to a PCP queue if we need
> to refill those."
This really helps. Will add it in v2.
Thanks Oscar.
>
> Just to remind ourselves of the dangers of a non-deterministic
> approach.
>
>
> Thanks
>
>
prev parent reply other threads:[~2024-04-11 2:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-07 8:54 Miaohe Lin
2024-04-08 19:29 ` Andrew Morton
2024-04-09 1:55 ` Miaohe Lin
2024-04-09 14:10 ` Oscar Salvador
2024-04-09 16:10 ` Oscar Salvador
2024-04-10 7:52 ` Miaohe Lin
2024-04-10 8:52 ` Oscar Salvador
2024-04-11 2:26 ` Miaohe Lin [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=247259aa-9c78-d1ae-c829-aa72adc75922@huawei.com \
--to=linmiaohe@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=naoya.horiguchi@nec.com \
--cc=osalvador@suse.de \
/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