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

From: Segher Boessenkool
Date: Mon May 08 2006 - 19:06:55 EST


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/