[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240930-burrowing-quokka-of-serendipity-f35eb4@leitao>
Date: Mon, 30 Sep 2024 03:01:14 -0700
From: Breno Leitao <leitao@...ian.org>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-kselftest@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Shuah Khan <shuah@...nel.org>, Mario Casquero <mcasquer@...hat.com>
Subject: Re: [PATCH v1 1/2] selftests/mm: hugetlb_fault_after_madv: use
default hguetlb page size
On Thu, Sep 26, 2024 at 05:20:43PM +0200, David Hildenbrand wrote:
> We currently assume that the hugetlb page size is 2 MiB, which is
> why we mmap() a 2 MiB range.
>
> Is the default hugetlb size is larger, mmap() will fail because the
> range is not suitable. If the default hugetlb size is smaller (e.g.,
> s390x), mmap() will fail because we would need more than one hugetlb
> page, but just asserted that we have exactly one.
>
> So let's simply use the default hugetlb page size instead of hard-coded
> 2 MiB, so the test isn't unconditionally skipped on architectures like
> s390x.
>
> Before this patch on s390x:
> $ ./hugetlb_fault_after_madv
> 1..0 # SKIP Failed to allocated huge page
>
> With this change on s390x:
> $ ./hugetlb_fault_after_madv
>
> While at it, make "huge_ptr" static.
>
> Reported-by: Mario Casquero <mcasquer@...hat.com>
> Signed-off-by: David Hildenbrand <david@...hat.com>
Reviewed-by: Breno Leitao <leitao@...ian.org>
Powered by blists - more mailing lists