Information for setting up SMT related parameters on linux 2.6.16 on POWER5

Segher Boessenkool segher at kernel.crashing.org
Tue May 9 09:04:51 EST 2006


> the HMT_* macros are telling firmware that "this processor thread  
> should
> run at this priority".  Typically used when we're waiting on a  
> spinlock.
> I.e. When we are waiting on a spinlock, we hit the HMT_low macro to  
> drop
> our threads priority, allowing the other thread to use those extra
> cycles finish it's stuff quicker, and maybe even release the lock  
> we're
> waiting for.          HMT_* is all within the kernel though, no  
> exposure
> to userspace apps.

Actually, those macros translate straight into a single machine insn.
No firmware is involved.  See include/asm-powerpc/processor.h.  For
example:

#define HMT_very_low()   asm volatile("or 31,31,31   # very low  
priority")

You can use those same macros from user space, although it is CPU
implementation dependent which priorities you can actually set (you
probably can do low and medium priority).


Segher




More information about the Linuxppc-dev mailing list