[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <C3CE35A3-7663-4B8E-9E85-8F0C3CD7D9EC@linux.dev>
Date: Thu, 11 Jan 2024 10:07:58 +0800
From: Muchun Song <muchun.song@...ux.dev>
To: Donet Tom <donettom@...ux.vnet.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kselftest@...r.kernel.org,
Aneesh Kumar <aneesh.kumar@...ux.ibm.com>,
Linux-MM <linux-mm@...ck.org>,
linuxppc-dev@...ts.ozlabs.org,
LKML <linux-kernel@...r.kernel.org>,
Geetika Moolchandani <geetika@...ux.ibm.com>
Subject: Re: [PATCH 1/1] selftests: mm: hugepage-vmemmap fails on 64K page
size systems.
> On Jan 10, 2024, at 23:53, Andrew Morton <akpm@...ux-foundation.org> wrote:
>
> (cc Muchun)
> On Wed, 10 Jan 2024 14:03:35 +0530 Donet Tom <donettom@...ux.vnet.ibm.com> wrote:
>
>> The kernel sefltest mm/hugepage-vmemmap fails on architectures
>> which has different page size other than 4K. In hugepage-vmemmap
>> page size used is 4k so the pfn calculation will go wrong on systems
>> which has different page size .The length of MAP_HUGETLB memory must
>> be hugepage aligned but in hugepage-vmemmap map length is 2M so this
>> will not get aligned if the system has differnet hugepage size.
>>
>> Added psize() to get the page size and default_huge_page_size() to
>> get the default hugepage size at run time, hugepage-vmemmap test pass
>> on powerpc with 64K page size and x86 with 4K page size.
>>
>> Result on powerpc without patch (page size 64K)
>> *# ./hugepage-vmemmap
>> Returned address is 0x7effff000000 whose pfn is 0
>> Head page flags (100000000) is invalid
>> check_page_flags: Invalid argument
>> *#
>>
>> Result on powerpc with patch (page size 64K)
>> *# ./hugepage-vmemmap
>> Returned address is 0x7effff000000 whose pfn is 600
>> *#
>>
>> Result on x86 with patch (page size 4K)
>> *# ./hugepage-vmemmap
>> Returned address is 0x7fc7c2c00000 whose pfn is 1dac00
>> *#
>>
>> Signed-off-by: Donet Tom <donettom@...ux.vnet.ibm.com>
>> Reported-by : Geetika Moolchandani (geetika@...ux.ibm.com)
>> Tested-by : Geetika Moolchandani (geetika@...ux.ibm.com)
Acked-by: Muchun Song <muchun.song@...ux.dev>
>
> I'll add
>
> Fixes: b147c89cd429 ("selftests: vm: add a hugetlb test case")
> Cc: <stable@...r.kernel.org>
Yes. It should be a real bug fix.
Thanks.
Powered by blists - more mailing lists