Re: [PATCH 0/9] x86/clear_huge_page: multi-page clearing

From: Raghavendra K T
Date: Mon Apr 10 2023 - 02:26:50 EST


On 4/9/2023 4:16 AM, Ankur Arora wrote:

Raghavendra K T <raghavendra.kt@xxxxxxx> writes:

On 4/3/2023 10:52 AM, Ankur Arora wrote:
This series introduces multi-page clearing for hugepages.

*Milan* mm/clear_huge_page x86/clear_huge_page change
(GB/s) (GB/s)
pg-sz=2MB 12.24 17.54 +43.30%
pg-sz=1GB 17.98 37.24 +107.11%


Hello Ankur,

Was able to test your patches. To summarize, am seeing 2x-3x perf
improvement for 2M, 1GB base hugepage sizes.

Great. Thanks Raghavendra.

SUT: Genoa AMD EPYC
Thread(s) per core: 2
Core(s) per socket: 128
Socket(s): 2

NUMA:
NUMA node(s): 2
NUMA node0 CPU(s): 0-127,256-383
NUMA node1 CPU(s): 128-255,384-511

Test: Use mmap(MAP_HUGETLB) to demand a fault on 64GB region (NUMA node0), for
both base-hugepage-size=2M and 1GB

perf stat -r 10 -d -d numactl -m 0 -N 0 <test>

time in seconds elapsed (average of 10 runs) (lower = better)

Result:
page-size mm/clear_huge_page x86/clear_huge_page
2M 5.4567 2.6774
1G 2.64452 1.011281

So translating into BW, for Genoa we have:

page-size mm/clear_huge_page x86/clear_huge_page
2M 11.74 23.97
1G 24.24 63.36

That's a pretty good bump over Milan:

*Milan* mm/clear_huge_page x86/clear_huge_page
(GB/s) (GB/s)
pg-sz=2MB 12.24 17.54
pg-sz=1GB 17.98 37.24

Btw, are these numbers with boost=1?


Yes it is. Also a note about config. I had not enabled
GCOV/LOCKSTAT related config because I faced some issues.