<div dir="ltr">I was just looking at <a href="https://github.com/opscode/ohai/blob/master/lib/ohai/plugins/linux/cpu.rb">https://github.com/opscode/ohai/blob/master/lib/ohai/plugins/linux/cpu.rb</a> and realized it&#39;s related to this conversation. It&#39;s how Chef enumerates CPUs on Linux and lines 42-44 is where it differentiates a real cpu vs a logical one.<div>
<br></div><div>Sean</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 22, 2014 at 3:55 PM, Gilbert E. Detillieux <span dir="ltr">&lt;<a href="mailto:gedetil@cs.umanitoba.ca" target="_blank">gedetil@cs.umanitoba.ca</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This article from several years ago suggests AMD processors did not support hyper-threading...<br>
<br>
<a href="http://www.ducea.com/2006/06/23/linux-tips-how-to-find-out-if-a-your-cpu-supports-ht-hyper-threading/" target="_blank">http://www.ducea.com/2006/06/<u></u>23/linux-tips-how-to-find-out-<u></u>if-a-your-cpu-supports-ht-<u></u>hyper-threading/</a><br>

<br>
...  but suggests they may in the future.  A talk with my CPU-savvy co-worker confirmed that AMD has never supported HT, and likely wouldn&#39;t ever.<br>
<br>
So, that raises the question:  What exactly does the &quot;ht&quot; flag in /proc/cpuinfo mean, then, if it&#39;s not the existence of HT?  This thread offers some insight...<br>
<br>
<a href="https://groups.google.com/forum/#!topic/fa.linux.kernel/rAttTaRINKw" target="_blank">https://groups.google.com/<u></u>forum/#!topic/fa.linux.kernel/<u></u>rAttTaRINKw</a><br>
<br>
So, the &quot;ht&quot; flag seems to just indicate a processor&#39;s ability to detect siblings, whether they&#39;re actual cores or just HT.  Misleading, yes, but they chose to leave it that way rather than break the ABI.<br>

<br>
&lt;rant&gt;<br>
Let&#39;s leave an obscure, misleading flag in a particular /proc file alone, to avoid breaking things for some programmer, somewhere, who may be doing some weird test that would be better done in some other way. But, on the other hand, let&#39;s completely change the way all process and device initialization happens in a very fundamental way, regardless of how many scripts and 3rd-party services break as a result...<br>

<br>
Gotta love Linux!  (OK, that may be an unfair juxtaposition, since we&#39;re talking about kernel vs user space, and different groups of people supporting these, with radically different priorities and methods.  But still...  Ugh!)<br>

&lt;/rant&gt;<br>
<br>
Gilbert<div class=""><br>
<br>
On 21/04/2014 9:02 AM, Grigory Shamov wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear Gilbert,<br>
<br>
On 14-04-17 4:33 PM, &quot;Gilbert E. Detillieux&quot; &lt;<a href="mailto:gedetil@cs.umanitoba.ca" target="_blank">gedetil@cs.umanitoba.ca</a>&gt;<br>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 17/04/2014 4:01 PM, Grigory Shamov wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Gilbert,<br>
<br>
Thanks!<br>
<br>
There is a lot of advice there for sure. For example, The &#39;ht&#39; flag is<br>
always there on our AMD Opterons (Shaghais and Barcelonas), even they do<br>
not have HT enabled. I&#39;d think that &#39;ht&#39; it is always there in any<br>
SMP-enabled linux kernel?<br>
</blockquote>
<br>
More likely, it&#39;s always there for any processor that supports HT,<br>
whether it&#39;s currently enabled or not.<br>
</blockquote>
<br>
<br>
Do you know if AMD Opterons support HT?<br>
<br>
model name      : Quad-Core AMD Opteron(tm) Processor 2376<br>
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat<br>
pse36 clflush mmx fxsr sse sse2 *ht* etc. etc.<br>
<br>
<br>
model name      : Six-Core AMD Opteron(tm) Processor 2431<br>
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat<br>
pse36 clflush mmx fxsr sse sse2 *ht* etc. etc.<br>
</blockquote>
<br>
-- <br></div>
Gilbert E. Detillieux           E-mail: &lt;<a href="mailto:gedetil@muug.mb.ca" target="_blank">gedetil@muug.mb.ca</a>&gt;<br>
Manitoba UNIX User Group        Web:    <a href="http://www.muug.mb.ca/" target="_blank">http://www.muug.mb.ca/</a><br>
PO Box 130 St-Boniface          Phone:  <a href="tel:%28204%29474-8161" value="+12044748161" target="_blank">(204)474-8161</a><br>
Winnipeg MB CANADA  R2H 3B4     Fax:    <a href="tel:%28204%29474-7609" value="+12044747609" target="_blank">(204)474-7609</a><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
Roundtable mailing list<br>
<a href="mailto:Roundtable@muug.mb.ca" target="_blank">Roundtable@muug.mb.ca</a><br>
<a href="http://www.muug.mb.ca/mailman/listinfo/roundtable" target="_blank">http://www.muug.mb.ca/mailman/<u></u>listinfo/roundtable</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Sean Walberg &lt;<a href="mailto:sean@ertw.com" target="_blank">sean@ertw.com</a>&gt;    <a href="http://ertw.com/" target="_blank">http://ertw.com/</a>
</div>