Avoid reading /sys/kernel/mm/transparent_hugepage/?

H.J. Lu hjl.tools@gmail.com
Fri Apr 10 07:40:30 GMT 2026


On Fri, Apr 10, 2026 at 3:28 PM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> > To enable THP segment load, ld.so opens and reads 2 files under
> > /sys/kernel/mm/transparent_hugepage/.   This requires mounting
> > /sys and is expensive.   Is it possible to put such info in vDSO?
>
> Alexey Dobriyan proposed adding AT_PAGE_SHIFT_LIST to the auxiliary

Does it cover

[hjl@gnu-tgl-3 linux]$ cat /sys/kernel/mm/transparent_hugepage/hpage_pmd_size
2097152
[hjl@gnu-tgl-3 linux]$

> vector a while back, but I don't know the status of that.
>

How can we get

[hjl@gnu-tgl-3 linux]$ cat /sys/kernel/mm/transparent_hugepage/enabled
always [madvise] never
[hjl@gnu-tgl-3 linux]$

-- 
H.J.


More information about the Libc-alpha mailing list