[v2,0/2] Improve MAP_HUGETLB with glibc.malloc.hugetlb=2

Message ID 20231123172915.893408-1-adhemerval.zanella@linaro.org
Headers
Series Improve MAP_HUGETLB with glibc.malloc.hugetlb=2 |

Message

Adhemerval Zanella Nov. 23, 2023, 5:29 p.m. UTC
  On some tests with glibc.malloc.hugetlb=2, there are some allocation
patterns that are not backed up by large pages (different than
libhugetlfs morecore implementation).

Adhemerval Zanella (2):
  elf: Add a way to check if tunable is set (BZ 27069)
  malloc: Improve MAP_HUGETLB with glibc.malloc.hugetlb=2

 elf/Versions             |  1 +
 elf/dl-tunable-types.h   |  1 +
 elf/dl-tunables.c        | 40 ++++++++++++++++++++++++++++++++++++++++
 elf/dl-tunables.h        | 28 ++++++++++++++++++++++++++++
 elf/dl-tunables.list     |  1 +
 malloc/arena.c           | 13 ++++++++++---
 scripts/gen-tunables.awk |  4 ++--
 7 files changed, 83 insertions(+), 5 deletions(-)
  

Comments

Zhangfei Gao Nov. 24, 2023, 7:57 a.m. UTC | #1
On Fri, 24 Nov 2023 at 01:29, Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> On some tests with glibc.malloc.hugetlb=2, there are some allocation
> patterns that are not backed up by large pages (different than
> libhugetlfs morecore implementation).
>
> Adhemerval Zanella (2):
>   elf: Add a way to check if tunable is set (BZ 27069)
>   malloc: Improve MAP_HUGETLB with glibc.malloc.hugetlb=2

Thanks, Adhemerval

Tested on aarch64, based on glibc master branch.
With these two patches, our application using 2M pages does not
trigger page faults now,
and many page faults before.

Tested-by: Zhangfei Gao <zhangfei.gao@linaro.org>