[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ddabd00d-7bd8-40f1-9a1b-22a31b07fd8c@collabora.com>
Date: Fri, 8 Nov 2024 19:13:04 +0500
From: Muhammad Usama Anjum <Usama.Anjum@...labora.com>
To: Donet Tom <donettom@...ux.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>, Shuah Khan <shuah@...nel.org>
Cc: Usama.Anjum@...labora.com, kernel@...labora.com, linux-mm@...ck.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selftests: hugetlb_dio: Check for initial conditions to
skip in the start
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
Powered by blists - more mailing lists