Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Setting procnto CPU affinity: (2 Items)
   
Setting procnto CPU affinity  
Hello

Yet again I'm trying to keep other process on my system from interfering with my audio processing/worker threads.
I have a Quadcore Intel processor and want to reserve 3 cores to run my processing threads *exclusively*. All the other 
threads, including interrupt handling, should happen on the 4th core.

With normal processes, I can do a "slay -C 0 XXXX" to set the process XXXX to run on CPU0 exlusively, for example.
I did this with the network driver io-pkt-v4, which was causing clicks and other artifacts in the audio signal. When I 
analyzed the kernal trace, I saw that the io-pkt was stealing the CPU from my processing threads. Of course, the 
processing threads have max priority set. Doing a slay -C0 fixed that problem.

Right now, I have the situation that Thread10 of the procnto-smp-instr is stealing CPU4 for about 160us every once in 
while, which is unacceptable.

Is there a way to confine procnto-smp-instr to a single CPU core? Maybe it has to be done directly in the build file?

I'll appreciate any hints or tips.

Lorenz
Re: Setting procnto CPU affinity  
Nevermind... 

I think I figured out why it was happening.

In the run dialog (run profile) in the Momentics IDE, you can specify a priority for your process. 

I always thought that if I set the priority manually in my program, it would override the priority set in the run 
profile.

Apperently it's the other way around: The profile prio is mightier.