lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <D7E8E7B2-3F2B-41C5-AB0C-78170806C69C@nvidia.com>
Date: Thu, 03 Jul 2025 10:53:49 -0400
From: Zi Yan <ziy@...dia.com>
To: Dev Jain <dev.jain@....com>
Cc: Aboorva Devarajan <aboorvad@...ux.ibm.com>, akpm@...ux-foundation.org,
 Liam.Howlett@...cle.com, lorenzo.stoakes@...cle.com, shuah@...nel.org,
 pfalcato@...e.de, david@...hat.com, baolin.wang@...ux.alibaba.com,
 npache@...hat.com, ryan.roberts@....com, baohua@...nel.org,
 linux-mm@...ck.org, linux-kselftest@...r.kernel.org,
 linux-kernel@...r.kernel.org, donettom@...ux.ibm.com, ritesh.list@...il.com
Subject: Re: [PATCH v2 2/7] selftests/mm: Add support to test 4PB VA on PPC64

On 3 Jul 2025, at 10:44, Dev Jain wrote:

> On 03/07/25 8:11 pm, Zi Yan wrote:
>> On 3 Jul 2025, at 2:06, Aboorva Devarajan wrote:
>>
>>> From: Donet Tom <donettom@...ux.ibm.com>
>>>
>>> PowerPC64 supports a 4PB virtual address space, but this test was
>>> previously limited to 512TB. This patch extends the coverage up to
>>> the full 4PB VA range on PowerPC64.
>>>
>>> Memory from 0 to 128TB is allocated without an address hint, while
>>> allocations from 128TB to 4PB use a hint address.
>>>
>>> Signed-off-by: Donet Tom <donettom@...ux.ibm.com>
>>> Signed-off-by: Aboorva Devarajan <aboorvad@...ux.ibm.com>
>>> ---
>>>   tools/testing/selftests/mm/virtual_address_range.c | 6 ++++++
>>>   1 file changed, 6 insertions(+)
>>>
>>> diff --git a/tools/testing/selftests/mm/virtual_address_range.c b/tools/testing/selftests/mm/virtual_address_range.c
>>> index e24c36a39f22..619acf0b9239 100644
>>> --- a/tools/testing/selftests/mm/virtual_address_range.c
>>> +++ b/tools/testing/selftests/mm/virtual_address_range.c
>>> @@ -50,6 +50,7 @@
>>>   #define NR_CHUNKS_256TB   (NR_CHUNKS_128TB * 2UL)
>>>   #define NR_CHUNKS_384TB   (NR_CHUNKS_128TB * 3UL)
>>>   #define NR_CHUNKS_3840TB  (NR_CHUNKS_128TB * 30UL)
>>> +#define NR_CHUNKS_3968TB  (NR_CHUNKS_128TB * 31UL)
>>>
>>>   #define ADDR_MARK_128TB  (1UL << 47) /* First address beyond 128TB */
>>>   #define ADDR_MARK_256TB  (1UL << 48) /* First address beyond 256TB */
>>> @@ -59,6 +60,11 @@
>>>   #define HIGH_ADDR_SHIFT 49
>>>   #define NR_CHUNKS_LOW   NR_CHUNKS_256TB
>>>   #define NR_CHUNKS_HIGH  NR_CHUNKS_3840TB
>>> +#elif defined(__PPC64__)
>>> +#define HIGH_ADDR_MARK  ADDR_MARK_128TB
>>> +#define HIGH_ADDR_SHIFT 48
>>> +#define NR_CHUNKS_LOW   NR_CHUNKS_128TB
>>> +#define NR_CHUNKS_HIGH  NR_CHUNKS_3968TB
>>>   #else
>>>   #define HIGH_ADDR_MARK  ADDR_MARK_128TB
>>>   #define HIGH_ADDR_SHIFT 48
>> Could you also update the comment above this code to say PowerPC64 also
>> supports 4PB virtual address space?
>>
>>  From the comment, arm64 supports 4PB but its NR_CHUNKS_HIGH is only 3840TB,
>> whereas PowerPC64 here can get to 3968TB. I do not know why arm64’s
>> 4PB is smaller. ;)
>
> The border for high VA space is 128 TB for x86 and ppc, for arm64 it
> is 256 TB.

Thank you for the explanation. :)

Best Regards,
Yan, Zi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ