linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Muhammad Usama Anjum <Usama.Anjum@collabora.com>
To: Donet Tom <donettom@linux.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Shuah Khan <shuah@kernel.org>
Cc: Usama.Anjum@collabora.com, kernel@collabora.com,
	linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests: hugetlb_dio: Check for initial conditions to skip in the start
Date: Fri, 8 Nov 2024 19:13:04 +0500	[thread overview]
Message-ID: <ddabd00d-7bd8-40f1-9a1b-22a31b07fd8c@collabora.com> (raw)
In-Reply-To: <13a96176-1bfa-4567-8ce5-a2b75b110afc@linux.ibm.com>

On 11/8/24 3:49 PM, Donet Tom wrote:

> I think below changes are required.
> 
> iff --git a/tools/testing/selftests/mm/hugetlb_dio.c b/tools/testing/selftests/mm/hugetlb_dio.c
> index 60001c142ce9..4b52106b8124 100644
> --- a/tools/testing/selftests/mm/hugetlb_dio.c
> +++ b/tools/testing/selftests/mm/hugetlb_dio.c
> @@ -44,6 +44,9 @@ void run_dio_using_hugetlb(unsigned int start_off, unsigned int end_off)
>         if (fd < 0)
>                 ksft_exit_fail_perror("Error opening file\n");
>  
> +       /* Get the free huge pages before allocation */
> +       free_hpage_b = get_free_hugepages();
> +
>         /* Allocate a hugetlb page */
> 
>         orig_buffer = mmap(NULL, h_pagesize, mmap_prot, mmap_flags, -1, 0);
> 
>         if (orig_buffer == MAP_FAILED) {
Please can you send a fixup patch as you have working test setup?
Otherwise I'll take it up and try to test on working setup before
posting the fixup patch. Please let me know.

> 
>  With this change the tests are passing.
> 
> ./tools/testing/selftests/mm/hugetlb_dio
> 
> TAP version 131..4
> # No. Free pages before allocation : 100
> # No. Free pages after munmap : 100
> ok 1 : Huge pages freed successfully !
> # No. Free pages before allocation : 100
> # No. Free pages after munmap : 100
> ok 2 : Huge pages freed successfully !
> # No. Free pages before allocation : 100
> # No. Free pages after munmap : 100
> ok 3 : Huge pages freed successfully !
> # No. Free pages before allocation : 100
> # No. Free pages after munmap : 100
> ok 4 : Huge pages freed successfully !
> # Totals: pass:4 fail:0 xfail:0 xpass:0 skip:0 error:0
> 
> Thanks
> Donet
> 
> 

-- 
BR,
Muhammad Usama Anjum



  reply	other threads:[~2024-11-08 14:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-01 14:15 Muhammad Usama Anjum
2024-11-01 18:54 ` Andrew Morton
2024-11-08 10:35 ` Donet Tom
2024-11-08 10:49   ` Donet Tom
2024-11-08 14:13     ` Muhammad Usama Anjum [this message]
2024-11-10  6:20       ` Andrew Morton
2024-11-10  6:34         ` Andrew Morton
2024-11-10  6:49           ` [PATCH] selftests: hugetlb_dio: Fixup " Donet Tom
2024-11-10  6:52             ` Donet Tom
2024-11-11  6:59               ` Andrew Morton
2024-11-10  6:56             ` Donet Tom

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=ddabd00d-7bd8-40f1-9a1b-22a31b07fd8c@collabora.com \
    --to=usama.anjum@collabora.com \
    --cc=akpm@linux-foundation.org \
    --cc=donettom@linux.ibm.com \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shuah@kernel.org \
    /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