malloc: Improve documentation of malloc tunables
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Tue Mar 10 17:03:40 GMT 2026
Hi Adhemerval,
On 10/03/26 12:56, Wilco Dijkstra wrote:
>
> Update default for tcache_count tunable. Remove existing documentation and
> mention removal of fastbins in mxfast tunable. Improve wording of hugetlb
> tunable, including default for AArch64.
>
> OK for commit?
> It does not address the value returned by --list-tunables, which can be
> misleading; nor the issues about memory consumption raised by Dimitri.
I'm testing a patch that shows it in --list-tunables, I'll post it when I get some
results back.
> I really think we should be more conservative and *not* make this default
> and only enable through the tunable. With system-wide tunables we will
> have an option to enable this as side-wide if user do want it.
We have been super conservative for way too long already. It's around 15 years
since it was enabled by default for distros and 4 years since the hugetlb tunable
was added to GLIBC. How many applications actually set glibc.malloc.hugetlb?
https://codesearch.debian.net/search?q=glibc.malloc.hugetlb&literal=1&perpkg=1
So the question is, how many more years should we wait before developers
figure out how to use the tunables?
Or we can use the distro settings and use THP when enabled. People can
disable it if it doesn't work well for them.
Cheers,
Wilco
More information about the Libc-alpha
mailing list