how to bind a function to cpu in SMP kernel? - Linux

This is a discussion on how to bind a function to cpu in SMP kernel? - Linux ; Hi, I am working on multi CPU environment. When I bring up SMP linux kernel, OS will manage all the CPUs For network related TX/RX, OS itself will decide and do calls XMIT function on any one of those CPUs. ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: how to bind a function to cpu in SMP kernel?

  1. how to bind a function to cpu in SMP kernel?

    Hi,

    I am working on multi CPU environment. When I bring up SMP linux
    kernel, OS will manage all the CPUs For network related TX/RX, OS
    itself will decide and do calls XMIT function on any one of those CPUs.


    Now, If I want to hold on one of the CPUs, so that, one particular cpu,
    I want OS to run some particular job and not to consider that CPU for
    any other job. To be specific, I want to bind one function to get
    executed in one of the CPUs and not to allow that cpu to run anything
    else.

    Is the above thing possible?

    thanks,
    MB.


  2. Re: how to bind a function to cpu in SMP kernel?

    "MB" writes:

    > Hi,
    >
    > I am working on multi CPU environment. When I bring up SMP linux
    > kernel, OS will manage all the CPUs For network related TX/RX, OS
    > itself will decide and do calls XMIT function on any one of those CPUs.
    >
    >
    > Now, If I want to hold on one of the CPUs, so that, one particular cpu,
    > I want OS to run some particular job and not to consider that CPU for
    > any other job. To be specific, I want to bind one function to get
    > executed in one of the CPUs and not to allow that cpu to run anything
    > else.


    I think CPU affinity could help you. I only write a test case about CPU
    affinity, and I could not tell you more than these links I got from
    Google. Hope they are usefull to you.

    http://www-128.ibm.com/developerwork...-affinity.html

    http://www.kernel.org/pub/linux/kern.../cpu-affinity/


    --
    Yao Qi
    GNU/Linux Developer

+ Reply to Thread