From: Ryan Roberts <ryan.roberts@arm.com>
To: Qi Zheng <zhengqi.arch@bytedance.com>,
mike.kravetz@oracle.com, songmuchun@bytedance.com,
akpm@linux-foundation.org, catalin.marinas@arm.com,
will@kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm: hugetlb: kill set_huge_swap_pte_at()
Date: Thu, 21 Sep 2023 17:25:44 +0100 [thread overview]
Message-ID: <7aee2aeb-acb2-4fe3-90b5-3dd43ee855c2@arm.com> (raw)
In-Reply-To: <20220626145717.53572-1-zhengqi.arch@bytedance.com>
On 26/06/2022 15:57, Qi Zheng wrote:
> The commit e5251fd43007 ("mm/hugetlb: introduce set_huge_swap_pte_at()
> helper") add set_huge_swap_pte_at() to handle swap entries on
> architectures that support hugepages consisting of contiguous ptes.
> And currently the set_huge_swap_pte_at() is only overridden by arm64.
>
> The set_huge_swap_pte_at() provide a sz parameter to help determine
> the number of entries to be updated. But in fact, all hugetlb swap
> entries contain pfn information, so we can find the corresponding
> folio through the pfn recorded in the swap entry, then the folio_size()
> is the number of entries that need to be updated.
>
> And considering that users will easily cause bugs by ignoring the
> difference between set_huge_swap_pte_at() and set_huge_pte_at().
> Let's handle swap entries in set_huge_pte_at() and remove the
> set_huge_swap_pte_at(), then we can call set_huge_pte_at()
> anywhere, which simplifies our coding.
>
> Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Hi,
FYI, I discovered a bug in v6.6-rc1 that causes a kernel panic, which I believe
is caused by this change. I've posted a fix along with a detailed explanation at
[1].
[1]
https://lore.kernel.org/linux-arm-kernel/20230921162007.1630149-1-ryan.roberts@arm.com/
Thanks,
Ryan
prev parent reply other threads:[~2023-09-21 17:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-26 14:57 Qi Zheng
2022-06-27 3:32 ` Muchun Song
2022-06-27 6:18 ` Anshuman Khandual
2022-06-27 6:55 ` Qi Zheng
2022-06-27 7:14 ` Anshuman Khandual
2022-06-27 7:29 ` Qi Zheng
2022-06-27 7:35 ` Anshuman Khandual
2022-06-27 14:34 ` Matthew Wilcox
2022-06-28 5:47 ` Anshuman Khandual
2022-06-27 7:44 ` Muchun Song
2022-06-27 8:27 ` Anshuman Khandual
2022-06-27 14:41 ` Matthew Wilcox
2022-06-28 3:34 ` Qi Zheng
2023-09-21 16:25 ` Ryan Roberts [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=7aee2aeb-acb2-4fe3-90b5-3dd43ee855c2@arm.com \
--to=ryan.roberts@arm.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=songmuchun@bytedance.com \
--cc=will@kernel.org \
--cc=zhengqi.arch@bytedance.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
all inboxes | Powered by JetHome®