From: Wei Yang <richard.weiyang@gmail.com>
To: Zi Yan <ziy@nvidia.com>
Cc: Wei Yang <richard.weiyang@gmail.com>,
akpm@linux-foundation.org, david@redhat.com,
lorenzo.stoakes@oracle.com, dev.jain@arm.com, linux-mm@kvack.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] selftests/mm: do check_huge_anon() with a number been passed in
Date: Sat, 9 Aug 2025 18:35:16 +0000 [thread overview]
Message-ID: <20250809183516.w5fbt2mrt7dqotcg@master> (raw)
In-Reply-To: <13D32FD8-FAC8-468A-9C92-23A1B61610C3@nvidia.com>
On Fri, Aug 08, 2025 at 12:01:47PM -0400, Zi Yan wrote:
>On 8 Aug 2025, at 11:59, Zi Yan wrote:
>
>> On 8 Aug 2025, at 11:56, Zi Yan wrote:
>>
>>> On 7 Aug 2025, at 4:27, Wei Yang wrote:
>>>
>>>> Currently it hard coded the number of hugepage to check for
>>>> check_huge_anon(), but we already have the number passed in.
>>>>
>>>> Do the check based on the number of hugepage passed in is more
>>>> reasonable.
>>>>
>>>> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
>>>> ---
>>>> tools/testing/selftests/mm/split_huge_page_test.c | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/tools/testing/selftests/mm/split_huge_page_test.c
>>>> index 44a3f8a58806..bf40e6b121ab 100644
>>>> --- a/tools/testing/selftests/mm/split_huge_page_test.c
>>>> +++ b/tools/testing/selftests/mm/split_huge_page_test.c
>>>> @@ -111,7 +111,7 @@ static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hp
>>>> unsigned long rss_anon_before, rss_anon_after;
>>>> size_t i;
>>>>
>>>> - if (!check_huge_anon(one_page, 4, pmd_pagesize))
>>>> + if (!check_huge_anon(one_page, nr_hpages, pmd_pagesize))
>>>> ksft_exit_fail_msg("No THP is allocated\n");
>>>>
>>>> rss_anon_before = rss_anon();
>>>
>>> Which commit is this patch based on?
>>>
>>> In mm-new[1], verify_rss_anon_split_huge_page_all_zeroes() accepts
>>> char *one_page and size_t len but no nr_hpages. This breaks
>>> split_huge_page_test.c compilation.
>>>
>>> Are you forgetting some cleanup patches before this one?
>>>
>>> [1] https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/tree/tools/testing/selftests/mm/split_huge_page_test.c?h=mm-new#n110
>>>
>>>
>>> Hi Andrew,
>>>
>>> Can you drop this one for now? Thanks.
>>
>> Wait. It seems that mm-new is different from Linus' tree[1]. I wonder
>> what is going on.
>>
>> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/mm/split_huge_page_test.c?h=v6.16#n109
>
>Wei, it seems that you lost the race to Muhammad Usama Anjum's cleanup patch[1].
>You might need to add nr_hpages back.
>
>[1] https://lore.kernel.org/all/20250731160132.1795351-6-usama.anjum@collabora.com/T/#u
>
Thanks.
My patch is based on mm-unstable. So currently we base commit on mm-new?
>--
>Best Regards,
>Yan, Zi
--
Wei Yang
Help you, Help me
next prev parent reply other threads:[~2025-08-09 18:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-07 8:27 Wei Yang
2025-08-07 9:26 ` Baolin Wang
2025-08-07 9:34 ` Donet Tom
2025-08-07 10:26 ` David Hildenbrand
2025-08-08 1:30 ` wang lian
2025-08-08 15:56 ` Zi Yan
2025-08-08 15:59 ` Zi Yan
2025-08-08 16:01 ` Zi Yan
2025-08-09 0:46 ` Andrew Morton
2025-08-09 18:35 ` Wei Yang [this message]
2025-08-10 14:04 ` Lorenzo Stoakes
2025-08-11 0:51 ` Wei Yang
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=20250809183516.w5fbt2mrt7dqotcg@master \
--to=richard.weiyang@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=dev.jain@arm.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=ziy@nvidia.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