<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>

<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>Re: Information for setting up SMT related parameters on linux 2.6.16 on POWER5</TITLE>
</HEAD>
<BODY>
<DIV id=idOWAReplyText63025 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Thanks guys </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>That answered so many of my questions. 
</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>If I were to use these macros from user 
space, would they remain set until next reboot or change ? POWER5 allows 
priorities 2 through 4 for user apps, so considering this, and the fact that the 
normal prioirity is level 4, if a user app resets it to say 2 and then finishes 
without changing it back to 4 , would all the subsequent user apps run at the 
new level 2. I wonder what I am saying even makes sense, because the kernel 
internally throttles the priority for various sections of the kernel code and it 
may even overwrite it. </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>On a slightly unrelated note, I appended 
some boot parameters like smt-enabled=on/off to /etc/lilo.conf and unfortunately 
I am not able to see any effect and it boots the same way. I am switching from 
the AIX world so I maybe doing something dumb, please point out if I am !&nbsp; 
This kind of seems to effect the bind processor calls using sys_setaffinity when 
there are 4 logical processors 0-3 on two physical processors, bind only allows 
me to set affinity to either cpu 0 or 2, this seems weird to me because my 
system is booting with two logical cpus and then I set online bit to 1 to turn 
the remaining on, thereafter&nbsp;I try binding and havent been very successful. 
</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>Thanks for all your replies. </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2></FONT>&nbsp;</DIV></DIV>
<DIV id=idSignature38110 dir=ltr><FONT face=Arial color=#000000 size=2>
<DIV>&nbsp;</DIV>
<DIV><BR>Mitesh R.&nbsp;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>&gt; the HMT_* macros are telling firmware that "this processor 
thread&nbsp;<BR>&gt; should<BR>&gt; run at this priority".&nbsp; Typically used 
when we're waiting on a&nbsp;<BR>&gt; spinlock.<BR>&gt; I.e. When we are waiting 
on a spinlock, we hit the HMT_low macro to&nbsp;<BR>&gt; drop<BR>&gt; our 
threads priority, allowing the other thread to use those extra<BR>&gt; cycles 
finish it's stuff quicker, and maybe even release the lock&nbsp;<BR>&gt; 
we're<BR>&gt; waiting for.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
HMT_* is all within the kernel though, no&nbsp;<BR>&gt; exposure<BR>&gt; to 
userspace apps.<BR><BR>Actually, those macros translate straight into a single 
machine insn.<BR>No firmware is involved.&nbsp; See 
include/asm-powerpc/processor.h.&nbsp; For<BR>example:<BR><BR>#define 
HMT_very_low()&nbsp;&nbsp; asm volatile("or 31,31,31&nbsp;&nbsp; # very 
low&nbsp;<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>