From: Matthew Wilcox <willy@infradead.org>
To: Naoya Horiguchi <naoya.horiguchi@linux.dev>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Miaohe Lin <linmiaohe@huawei.com>,
David Hildenbrand <david@redhat.com>,
Vlastimil Babka <vbabka@suse.cz>, Hugh Dickins <hughd@google.com>,
Minchan Kim <minchan@kernel.org>,
Naoya Horiguchi <naoya.horiguchi@nec.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] mm/hwpoison: convert TTU_IGNORE_HWPOISON to TTU_HWPOISON
Date: Tue, 21 Feb 2023 13:35:39 +0000 [thread overview]
Message-ID: <Y/TIq05CjrMyg7f0@casper.infradead.org> (raw)
In-Reply-To: <20230221085905.1465385-1-naoya.horiguchi@linux.dev>
On Tue, Feb 21, 2023 at 05:59:05PM +0900, Naoya Horiguchi wrote:
> After a memory error happens on a clean folio, a process unexpectedly
> receives SIGBUS when it accesses to the error page. This SIGBUS killing
> is pointless and simply degrades the level of RAS of the system, because
> the clean folio can be dropped without any data lost on memory error
> handling as we do for a clean pagecache.
>
> When memory_failure() is called on a clean folio, try_to_unmap() is called
> twice (one from split_huge_page() and one from hwpoison_user_mappings()).
> The root cause of the issue is that pte conversion to hwpoisoned entry is
> now done in the first call of try_to_unmap() because PageHWPoison is already
> set at this point, while it's actually expected to be done in the second
> call. This behavior disturbs the error handling operation like removing
> pagecache, which results in the malfunction described above.
>
> So convert TTU_IGNORE_HWPOISON into TTU_HWPOISON and set TTU_HWPOISON only
> when we really intend to convert pte to hwpoison entry. This can prevent
> other callers of try_to_unmap() from accidentally converting to hwpoison
> entries.
>
> Fixes: a42634a6c07d ("readahead: Use a folio in read_pages()")
How did you choose this Fixes tag?
next prev parent reply other threads:[~2023-02-21 13:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 8:59 Naoya Horiguchi
2023-02-21 13:35 ` Matthew Wilcox [this message]
2023-02-21 23:20 ` HORIGUCHI NAOYA(堀口 直也)
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=Y/TIq05CjrMyg7f0@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=naoya.horiguchi@linux.dev \
--cc=naoya.horiguchi@nec.com \
--cc=vbabka@suse.cz \
/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