linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Donet Tom <donettom@linux.ibm.com>
To: Wei Yang <richard.weiyang@gmail.com>,
	akpm@linux-foundation.org, david@redhat.com,
	lorenzo.stoakes@oracle.com, ziy@nvidia.com, dev.jain@arm.com
Cc: 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: Thu, 7 Aug 2025 15:04:01 +0530	[thread overview]
Message-ID: <b9e29604-b771-4e57-a3d7-430572e552b1@linux.ibm.com> (raw)
In-Reply-To: <20250807082707.30647-1-richard.weiyang@gmail.com>


On 8/7/25 1:57 PM, 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();

LGTM

reviewed-by: Donet Tom <donettom@linux.ibm.com>




  parent reply	other threads:[~2025-08-07  9:34 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 [this message]
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
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=b9e29604-b771-4e57-a3d7-430572e552b1@linux.ibm.com \
    --to=donettom@linux.ibm.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=richard.weiyang@gmail.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