From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Zhenhua Huang <quic_zhenhuah@quicinc.com>, catalin.marinas@arm.com
Cc: will@kernel.org, ardb@kernel.org, ryan.roberts@arm.com,
mark.rutland@arm.com, joey.gouly@arm.com,
dave.hansen@linux.intel.com, akpm@linux-foundation.org,
chenfeiyang@loongson.cn, chenhuacai@kernel.org,
linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, quic_tingweiz@quicinc.com
Subject: Re: [PATCH v3] arm64: mm: Test for pmd_sect() in vmemmap_check_pmd()
Date: Fri, 3 Jan 2025 12:36:36 +0530 [thread overview]
Message-ID: <3aed8d7d-568c-43fc-a157-cb13d6259ebe@arm.com> (raw)
In-Reply-To: <20250102074047.674156-1-quic_zhenhuah@quicinc.com>
On 1/2/25 13:10, Zhenhua Huang wrote:
> Commit 2045a3b8911b ("mm/sparse-vmemmap: generalise vmemmap_populate_hugepages()")
> introduces the vmemmap_check_pmd() while does not verify if the entry is a
> section mapping, as is already done for Loongarch & X86.
> The update includes a check for pmd_sect(). Only if pmd_sect() returns true,
> further vmemmap population for the addr is skipped.
>
> Signed-off-by: Zhenhua Huang <quic_zhenhuah@quicinc.com>
> ---
> Separate the patch out based on the discussion:
> https://lore.kernel.org/linux-arm-kernel/20241209094227.1529977-3-quic_zhenhuah@quicinc.com/T/#m41d49cd91b348ecfe2c37c4b3c0911180426934e
LGTM, regardless whether this patch goes on its own or via the series.
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
>
> arch/arm64/mm/mmu.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
> index 9afeb35673a3..50a22c63f450 100644
> --- a/arch/arm64/mm/mmu.c
> +++ b/arch/arm64/mm/mmu.c
> @@ -1172,7 +1172,8 @@ int __meminit vmemmap_check_pmd(pmd_t *pmdp, int node,
> unsigned long addr, unsigned long next)
> {
> vmemmap_verify((pte_t *)pmdp, node, addr, next);
> - return 1;
> +
> + return pmd_sect(READ_ONCE(*pmdp));
> }
>
> int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
next prev parent reply other threads:[~2025-01-03 7:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-02 7:40 Zhenhua Huang
2025-01-03 7:06 ` Anshuman Khandual [this message]
2025-01-08 16:38 ` Will Deacon
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=3aed8d7d-568c-43fc-a157-cb13d6259ebe@arm.com \
--to=anshuman.khandual@arm.com \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=chenfeiyang@loongson.cn \
--cc=chenhuacai@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=joey.gouly@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mark.rutland@arm.com \
--cc=quic_tingweiz@quicinc.com \
--cc=quic_zhenhuah@quicinc.com \
--cc=ryan.roberts@arm.com \
--cc=will@kernel.org \
/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