linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Donet Tom <donettom@linux.ibm.com>
To: Zi Yan <ziy@nvidia.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org
Cc: David Hildenbrand <david@redhat.com>,
	Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	"Liam R. Howlett" <Liam.Howlett@oracle.com>,
	Nico Pache <npache@redhat.com>,
	Ryan Roberts <ryan.roberts@arm.com>, Dev Jain <dev.jain@arm.com>,
	Barry Song <baohua@kernel.org>, Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/mm: fix split_huge_page_test for folio_split() tests.
Date: Wed, 9 Jul 2025 10:26:39 +0530	[thread overview]
Message-ID: <8f174b94-8b87-47f8-a533-d6c4020cab2a@linux.ibm.com> (raw)
In-Reply-To: <20250709012800.3225727-1-ziy@nvidia.com>


On 7/9/25 6:57 AM, Zi Yan wrote:

Hi Zi Yan

> PID_FMT does not have an offset field, so folio_split() tests are not
> performed. Add PID_FMT_OFFSET with an offset field and use it to perform
> folio_split() tests.
>
> Fixes: 80a5c494c89f ("selftests/mm: add tests for folio_split(), buddy allocator like split")
> Signed-off-by: Zi Yan <ziy@nvidia.com>
> ---
>   tools/testing/selftests/mm/split_huge_page_test.c | 3 ++-
>   1 file changed, 2 insertions(+), 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 aa7400ed0e99..f0d9c035641d 100644
> --- a/tools/testing/selftests/mm/split_huge_page_test.c
> +++ b/tools/testing/selftests/mm/split_huge_page_test.c
> @@ -31,6 +31,7 @@ uint64_t pmd_pagesize;
>   #define INPUT_MAX 80
>   
>   #define PID_FMT "%d,0x%lx,0x%lx,%d"
> +#define PID_FMT_OFFSET "%d,0x%lx,0x%lx,%d,%d"
>   #define PATH_FMT "%s,0x%lx,0x%lx,%d"
>   
>   #define PFN_MASK     ((1UL<<55)-1)
> @@ -483,7 +484,7 @@ void split_thp_in_pagecache_to_order_at(size_t fd_size, const char *fs_loc,
>   		write_debugfs(PID_FMT, getpid(), (uint64_t)addr,
>   			      (uint64_t)addr + fd_size, order);
>   	else
> -		write_debugfs(PID_FMT, getpid(), (uint64_t)addr,
> +		write_debugfs(PID_FMT_OFFSET, getpid(), (uint64_t)addr,
>   			      (uint64_t)addr + fd_size, order, offset);
>   
>   	for (i = 0; i < fd_size; i++)
>

This looks good to me.

I tested it on my system, and the test is passing.

ok 17 Split PMD-mapped pagecache folio to order 0 at in-folio offset 0 
passed
ok 18 Split PMD-mapped pagecache folio to order 0 at in-folio offset 8 
passed
ok 19 Split PMD-mapped pagecache folio to order 0 at in-folio offset 16 
passed
ok 20 Split PMD-mapped pagecache folio to order 0 at in-folio offset 24 
passed
ok 21 Split PMD-mapped pagecache folio to order 1 at in-folio offset 0 
passed
ok 22 Split PMD-mapped pagecache folio to order 1 at in-folio offset 8 
passed
ok 23 Split PMD-mapped pagecache folio to order 1 at in-folio offset 16 
passed
ok 24 Split PMD-mapped pagecache folio to order 1 at in-folio offset 24 
passed
ok 25 Split PMD-mapped pagecache folio to order 2 at in-folio offset 0 
passed
ok 26 Split PMD-mapped pagecache folio to order 2 at in-folio offset 8 
passed
ok 27 Split PMD-mapped pagecache folio to order 2 at in-folio offset 16 
passed
ok 28 Split PMD-mapped pagecache folio to order 2 at in-folio offset 24 
passed
ok 29 Split PMD-mapped pagecache folio to order 3 at in-folio offset 0 
passed
ok 30 Split PMD-mapped pagecache folio to order 3 at in-folio offset 8 
passed
ok 31 Split PMD-mapped pagecache folio to order 3 at in-folio offset 16 
passed
ok 32 Split PMD-mapped pagecache folio to order 3 at in-folio offset 24 
passed
ok 33 Split PMD-mapped pagecache folio to order 4 at in-folio offset 0 
passed
ok 34 Split PMD-mapped pagecache folio to order 4 at in-folio offset 16 
passed


Feel free to add:

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





  parent reply	other threads:[~2025-07-09  4:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-09  1:27 Zi Yan
2025-07-09  2:55 ` Baolin Wang
2025-07-09  4:56 ` Donet Tom [this message]
2025-07-09 12:28 ` Lorenzo Stoakes
2025-07-11 13:29 ` David Hildenbrand
2025-07-11 14:19   ` Zi Yan

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=8f174b94-8b87-47f8-a533-d6c4020cab2a@linux.ibm.com \
    --to=donettom@linux.ibm.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@redhat.com \
    --cc=dev.jain@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=npache@redhat.com \
    --cc=ryan.roberts@arm.com \
    --cc=shuah@kernel.org \
    --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