rsmalloc: CPU-local allocation
performanceComments
Is this just a niche win for small machines? How does this actually behave on a multi-socket NUMA system where the core distance matters more than the rseq optimization?
The assertion that it stops treating threads as the unit of locality is slightly imprecise. rseq (restartable sequences) provides an atomic mechanism for per-CPU data access, but the execution context remains the thread; it simply minimizes the penalty of migration.
The documentation indicates a significant drop in cache misses compared to standard TLS. By bypassing the thread-local lookup, it keeps the allocation metadata in the L1 cache of the active core.
just offloading the migration overhead to the kernel.
This is a timely addition for developers using thread-per-core runtimes like Monoio. It simplifies the memory management layer for those who are already pinning tasks to specific hardware.