-
a question about NUMA
Let's say that I have two threads running on two different nodes. Suppose that each thread frequently call the same function foo().
Code:
void ThreadFunc1()
{
//do stuff
foo();
//do stuff
}
void ThreadFunc2()
{
//do other stuff
foo();
//do other stuff
}
void foo()
{
//do something
}
Could it bring to a performance hit, since the code of foo() resides on physical memory of only one of the two nodes?
Any help is appreciated...
-
-
I don't think so, unless you are changing the function (self-modifying code). The code can be cached by both CPUs. It only needs to be flushed when one copy is written to.