From: Zi Yan <ziy@nvidia.com>
To: "Zach O'Keefe" <zokeefe@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH] selftests/mm: fix split huge page tests
Date: Mon, 06 Mar 2023 13:32:53 -0500 [thread overview]
Message-ID: <4B992776-098B-43B8-97B5-17856BCDD72E@nvidia.com> (raw)
In-Reply-To: <20230306183119.igudzgqj5bemqkox@google.com>
[-- Attachment #1: Type: text/plain, Size: 2083 bytes --]
On 6 Mar 2023, at 13:31, Zach O'Keefe wrote:
> On Mar 06 11:09, Zi Yan wrote:
>> From: Zi Yan <ziy@nvidia.com>
>>
>> Fixed two inputs to check_anon_huge() and one if condition, so the tests
>> work as expected.
>>
>> Fixes: c07c343cda8e ("selftests/vm: dedup THP helpers")
>> Signed-off-by: Zi Yan <ziy@nvidia.com>
>> Cc: Zach O'Keefe <zokeefe@google.com>
>> ---
>> tools/testing/selftests/mm/split_huge_page_test.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/tools/testing/selftests/mm/split_huge_page_test.c
>> index 76e1c36dd9e5..b8558c7f1a39 100644
>> --- a/tools/testing/selftests/mm/split_huge_page_test.c
>> +++ b/tools/testing/selftests/mm/split_huge_page_test.c
>> @@ -106,7 +106,7 @@ void split_pmd_thp(void)
>> for (i = 0; i < len; i++)
>> one_page[i] = (char)i;
>>
>> - if (!check_huge_anon(one_page, 1, pmd_pagesize)) {
>> + if (!check_huge_anon(one_page, 4, pmd_pagesize)) {
>> printf("No THP is allocated\n");
>> exit(EXIT_FAILURE);
>> }
>> @@ -122,7 +122,7 @@ void split_pmd_thp(void)
>> }
>>
>>
>> - if (check_huge_anon(one_page, 0, pmd_pagesize)) {
>> + if (!check_huge_anon(one_page, 0, pmd_pagesize)) {
>> printf("Still AnonHugePages not split\n");
>> exit(EXIT_FAILURE);
>> }
>> @@ -169,7 +169,7 @@ void split_pte_mapped_thp(void)
>> for (i = 0; i < len; i++)
>> one_page[i] = (char)i;
>>
>> - if (!check_huge_anon(one_page, 1, pmd_pagesize)) {
>> + if (!check_huge_anon(one_page, 4, pmd_pagesize)) {
>> printf("No THP is allocated\n");
>> exit(EXIT_FAILURE);
>> }
>> --
>> 2.39.2
>>
>
> Thanks Zi -- I had this in my TODO-log, but was slow to get it it -- apologies
> for the clearly buggy code, and thanks for the cleanup. I've ran these tests to
> confirm (as I should have previously), and it all looks good. Can have either my
>
> Reviewed-by: Zach O'Keefe <zokeefe@google.com>
> Tested-by: Zach O'Keefe <zokeefe@google.com>
>
Thanks.
--
Best Regards,
Yan, Zi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 854 bytes --]
next prev parent reply other threads:[~2023-03-06 18:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 16:09 Zi Yan
2023-03-06 18:31 ` Zach O'Keefe
2023-03-06 18:32 ` Zi Yan [this message]
2023-03-07 10:22 ` 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=4B992776-098B-43B8-97B5-17856BCDD72E@nvidia.com \
--to=ziy@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shuah@kernel.org \
--cc=zokeefe@google.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