[dpdk-users] lcore stack location and NUMA nodes
nbenes at eso.org
Tue May 14 16:50:00 CEST 2019
is it ensured that the stacks of lcore threads with set affinity are
located on the same NUMA node as the assigned CPU core?
So far, I understand that e.g. `rte_eal_mp_remote_launch()` does not
actually create threads but just communicates the function to execute to
already existing threads (via pipes). These threads are created during
initialisation of the EAL:
The threads execute a state machine `eal_thread_loop()` where the
affinity is changed/set for the corresponding lcore/thread:
However, couldn't this lead to the stacks of some threads to be still
located on the (different) NUMA node where `pthread_create()` was called
from, i.e. possible decreased performance?
I did not find an explicit relocation of thread stacks.
(I also did not find anything related in the glibc/nptl code)
One possible fix may be to change the affinity of the main/master thread
before calling `pthread_create()` for the slaves and to reset the
affinity of the master thread after all slave threads are created.
More information about the users