I want jemalloc to use transparent huge pages.
My environment parameter are as follows:
echo $MALLOC_CONF
"thp:always,prof:false,prof_active:false,trust_madvise:false"
However, kernel THP were not enabled. When I set /sys/kernel/mm/transparent_hugepage/enabled to madvise and execute the command grep Huge /proc/meminfo, the field AnonHugePages did not increase. As a comparison, when /sys/kernel/mm/transparent_hugepage/enabled is set to always, the field AnonHugePages increases significantly.
I examined the parameter passed to kernel do_madvise() function and found that there are no function calls in the system that use MADV_HUGEPAGE parameter, which differs from the document:
The "always" setting enables transparent hugepage for all user memory mappings with MADV_HUGEPAGE
Moreover, with current MALLOC_CONF, jemalloc report message of stderr F <jemalloc>: Malformed conf string. I tried with method from this issue, but didn't help.
How can jemalloc use THP without recompiling and affecting other processes?