From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Ryan Roberts <ryan.roberts@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-mm@kvack.org
Subject: Re: [PATCH v1] mm/debug_vm_pgtable: Test pmd_leaf() behavior with pmd_mkinvalid()
Date: Thu, 2 May 2024 08:13:14 +0530 [thread overview]
Message-ID: <c5fb56d9-13ad-425a-a327-111ab249e649@arm.com> (raw)
In-Reply-To: <20240501144439.1389048-1-ryan.roberts@arm.com>
Hello Ryan,
On 5/1/24 20:14, Ryan Roberts wrote:
> An invalidated pmd should still cause pmd_leaf() to return true. Let's
> test for that to ensure all arches remain consistent.
This test definitely makes sense.
>
> Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
> ---
>
> Hi Andrew,
>
> This applies on top of v6.9-rc5. It came out of a discussion with Catalin around
> the pmd_mkinvalid() bug (the fix for which I just posted). I've run the new test
> on both arm64 and x86_64.
Right, works on arm64.
>
> Thanks,
> Ryan
>
> mm/debug_vm_pgtable.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c
> index 65c19025da3d..57e9cb0820ab 100644
> --- a/mm/debug_vm_pgtable.c
> +++ b/mm/debug_vm_pgtable.c
> @@ -981,6 +981,7 @@ static void __init pmd_thp_tests(struct pgtable_debug_args *args)
> #ifndef __HAVE_ARCH_PMDP_INVALIDATE
> WARN_ON(!pmd_trans_huge(pmd_mkinvalid(pmd_mkhuge(pmd))));
> WARN_ON(!pmd_present(pmd_mkinvalid(pmd_mkhuge(pmd))));
> + WARN_ON(!pmd_leaf(pmd_mkinvalid(pmd_mkhuge(pmd))));
> #endif /* __HAVE_ARCH_PMDP_INVALIDATE */
> }
Should not we update descriptions in Documentation/mm/arch_pgtable_helpers.rst
asserting that pmd_mkinvalid() also preserves pmd_leaf() ?
next prev parent reply other threads:[~2024-05-02 2:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-01 14:44 Ryan Roberts
2024-05-02 2:43 ` Anshuman Khandual [this message]
2024-05-02 7:30 ` Ryan Roberts
2024-05-02 8:03 ` Anshuman Khandual
2024-05-02 8:20 ` Ryan Roberts
2024-05-02 13:10 ` David Hildenbrand
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=c5fb56d9-13ad-425a-a327-111ab249e649@arm.com \
--to=anshuman.khandual@arm.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=linux-mm@kvack.org \
--cc=ryan.roberts@arm.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