a question about NUMA

This is a discussion on a question about NUMA within the Windows Programming forums, part of the Platform Specific Boards category; Let's say that I have two threads running on two different nodes. Suppose that each thread frequently call the same ...

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    41

    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...

  2. #2
    Registered User
    Join Date
    May 2007
    Posts
    41
    up...

  3. #3
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,181
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 12:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21