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

Meswani, Mitesh mmeswani at utep.edu
Sat May 20 10:25:11 EST 2006


Hello Segher and Will 
 
I tried using these macros on some applications and they dont seem to have any effect. I am running everything as root, and have been using bind processor commands to ensure that a task is assigned to a logical cpu. Since I am running SPEC CPU benchmarks I was exepecting to see a difference in run times, CPI when running two seperate SPEC apps on SMT threads. 
 
Is there some thing else I need to do to make sure that the processor takes the hint to "lower the HMT priority " , I am executing them from a regular shell which I assume has user level priority. 
 
 
Thanks
Mitesh 
 
 

Mitesh R. Meswani 
Ph.D. Candidate 
Research Associate, PLS2 Group
Room 106 F, Department of Computer Science
The University of Texas at El Paso, 
El Paso, Texas 79968
Tel: 915 747 8012 (O)
Email: mmeswani at utep.edu

________________________________

From: Segher Boessenkool [mailto:segher at kernel.crashing.org]
Sent: Mon 5/8/2006 5:04 PM
To: will_schmidt at vnet.ibm.com
Cc: Meswani, Mitesh; linuxppc-dev at ozlabs.org; Arnd Bergmann; linux-kernel at vger.kernel.org; cbe-oss-dev at ozlabs.org
Subject: Re: Information for setting up SMT related parameters on linux 2.6.16 on POWER5



> 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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20060519/cfa1c3f9/attachment.htm>


More information about the Linuxppc-dev mailing list