From: Miaohe Lin <linmiaohe@huawei.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: <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: Tue, 9 Apr 2024 09:55:45 +0800 [thread overview]
Message-ID: <7a0bdaac-73cc-fb90-d323-aa68444c7e54@huawei.com> (raw)
In-Reply-To: <20240408122955.82183316d06cfe32fbacad0e@linux-foundation.org>
On 2024/4/9 3:29, Andrew Morton wrote:
> On Sun, 7 Apr 2024 16:54:56 +0800 Miaohe Lin <linmiaohe@huawei.com> wrote:
>
>> When I did hard offline test with hugetlb pages, below deadlock occurs:
>>
>> ...
>>
>> Fix this by calling drain_all_pages() instead.
>
> Thanks. I propose
>
> Fixes: 510d25c92ec4a ("mm/hwpoison: disable pcp for page_handle_poison()")
IMHO this issue won't occur until commit a6b40850c442 ("mm: hugetlb: replace hugetlb_free_vmemmap_enabled with a static_key").
As it introduced rlock(cpu_hotplug_lock) in dissolve_free_huge_page() code path while lock(pcp_batch_high_lock) is already
in the __page_handle_poison(). So it might be more appropriate to use:
Fixes: a6b40850c442 ("mm: hugetlb: replace hugetlb_free_vmemmap_enabled with a static_key")
> Cc: <stable@vger.kernel.org>
Thanks for doing this.
>
> .
>
next prev parent reply other threads:[~2024-04-09 1:55 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 [this message]
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
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=7a0bdaac-73cc-fb90-d323-aa68444c7e54@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 \
/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