Is there some way to allocate specific memory for data in NUMA?

861 views Asked by At

I want to allocate memory among all the nodes' memory within the NUMA in a way that I can control (for example, allocate a in node1's memory, allocate b in node2's memory, and allocate c in node4's memory…).

Is there any way to achieve this?

1

There are 1 answers

0
Jeandey Boris On

Maybe could you use the numa_alloc_onnode function (NUMA policy library) to achieve your goal but such allocations are slow.

But bear in mind that NUMA memory affinity is strongly linked to the executing thread which is running on a core [thread->core->NUMA node]. I believe you know what you are doing.

http://man7.org/linux/man-pages/man3/numa.3.html