RFC: Proposal: Add NUMA Memory Policy Tunable to glibc malloc implementation

Florian Weimer fweimer@redhat.com
Mon Aug 4 15:15:18 GMT 2025


* 罗春生:

> Implementation would:
> 1. Apply during ptmalloc initialization (before any user allocations)
> 2. Call set_mempolicy() system calls internally
> 3. Use node mask from existing GLIBC_TUNABLES (e.g., glibc.malloc.arena_nodes)
>
> Technical Advantages:
> 1. Eliminates recursion risks from LD_PRELOAD hooks
> 2. Provides standard mechanism across all glibc-supported architectures
> 4. No external library dependencies (avoids libnuma constraints)

I don't see why you need LD_PRELOAD for this.  The manual page says that
set_mempolicy is preserved across fork and execve.  For such process
attributes, we do not provide tunables.

Thanks,
Florian



More information about the Libc-alpha mailing list