Results 1 to 2 of 2
Hello
I am using an IBM p550 system with POWER5 cpus. In this arch, which has SMT (hyperthreading) enabled, one is allowed to set the logical processors priorities. These are ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-24-2006 #1Just Joined!
- Join Date
- Dec 2005
- Posts
- 4
Hardware thread priority in PPC64 linux
Hello
I am using an IBM p550 system with POWER5 cpus. In this arch, which has SMT (hyperthreading) enabled, one is allowed to set the logical processors priorities. These are macros in include/asm-ppc64/processor.h like HMT_low(), which are really just OR instructions asm_volatile("or 1,1,1").
I have seen these macros used in the kernel 2.6 distro's for spin locks. However when I use them in my program I am not able to see any effect. The desired effect is that given two logical processors mapped to the same physical cpu, the one with higher priority will get more decode cycles and hence will execute programs faster.
The code is something like this and runs in user space:
#include <asm-ppc65/processor.h>
int main()
{
HMT_low();
...
some computations
...
HMT_medium();
}
and use taskset to bind the PID of this process to a particular CPU, and run the same code but without HMT_* macros on another CPU.
Can some one help me with:
1) Has any one be successful in using these macros in user space
2) How can I execute this app in kernel space, I am not sure of how Kernel modules can be used in this regards.
Thanks for any help
- 05-24-2006 #2I'm not sure this takes effect in user space... this could be dangerous because you could set an extremly high priority for your thread.
Originally Posted by mrmeswani
You can read this article to know how modules works and to write a simple module.
Originally Posted by mrmeswani
Best regards


Reply With Quote
