<HTML dir=ltr><HEAD><TITLE>Re: Information for setting up SMT related parameters on linux 2.6.16 on POWER5</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.5296.0" name=GENERATOR><BASE href=HEAD>
<BODY>
<DIV id=idOWAReplyText9297 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Hello Segher and Will </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>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. </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>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. </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>Mitesh </FONT></DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2></FONT> </DIV></DIV>
<DIV id=idSignature53388 dir=ltr><FONT face=Arial color=#000000 size=2>
<DIV> </DIV>
<DIV><BR>Mitesh R. Meswani <BR>Ph.D. Candidate </DIV>
<DIV>Research Associate, PLS2 Group</DIV>
<DIV>Room 106 F, Department of Computer Science</DIV>
<DIV>The University of Texas at El Paso, </DIV>
<DIV>El Paso, Texas 79968<BR>Tel: 915 747 8012 (O)</DIV>
<DIV>Email: mmeswani@utep.edu</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Segher Boessenkool [mailto:segher@kernel.crashing.org]<BR><B>Sent:</B> Mon 5/8/2006 5:04 PM<BR><B>To:</B> will_schmidt@vnet.ibm.com<BR><B>Cc:</B> Meswani, Mitesh; linuxppc-dev@ozlabs.org; Arnd Bergmann; linux-kernel@vger.kernel.org; cbe-oss-dev@ozlabs.org<BR><B>Subject:</B> Re: Information for setting up SMT related parameters on linux 2.6.16 on POWER5<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>> the HMT_* macros are telling firmware that "this processor thread <BR>> should<BR>> run at this priority". Typically used when we're waiting on a <BR>> spinlock.<BR>> I.e. When we are waiting on a spinlock, we hit the HMT_low macro to <BR>> drop<BR>> our threads priority, allowing the other thread to use those extra<BR>> cycles finish it's stuff quicker, and maybe even release the lock <BR>> we're<BR>> waiting for. HMT_* is all within the kernel though, no <BR>> exposure<BR>> to userspace apps.<BR><BR>Actually, those macros translate straight into a single machine insn.<BR>No firmware is involved. See include/asm-powerpc/processor.h. For<BR>example:<BR><BR>#define HMT_very_low() asm volatile("or 31,31,31 # very low <BR>priority")<BR><BR>You can use those same macros from user space, although it is CPU<BR>implementation dependent which priorities you can actually set (you<BR>probably can do low and medium priority).<BR><BR><BR>Segher<BR><BR></FONT></P></DIV></BODY></HTML>