Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>Rule of thumb: On a desktop, if you have an i5 you do not have Hyperthreading. All i3s and i7s do have Hyperthreading, as do new Kaby Lake Pentiums (G4560, 4600, 4620).

Hmm...either this statement is wrong or this desktop /proc/cpinfo is wrong:

    $ grep -E 'model|stepping|cpu cores' /proc/cpuinfo | sort -u
    cpu cores	    : 4
    model           : 94
    model name	    : Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz
    stepping	    : 3
    $ grep -q '^flags.*[[:space:]]ht[[:space:]]' /proc/cpuinfo && echo "Hyper-threading is supported"
    Hyper-threading is supported
Intel's product spec page[1] lists this CPU as not supporting Hyper-Threading so I'm a bit puzzled as to why the ht flag is present.

[1]https://ark.intel.com/products/88188/Intel-Core-i5-6600-Proc...



Hmmm, checking for "ht" seems to be giving weird info. On a i5-750 here (few years old), running Fedora 25:

    $ grep '^flags.*[[:space:]]ht[[:space:]]' /proc/cpuinfo
    flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush
    dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts
    rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2
    ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid dtherm ida
"ht" is being returned even though the CPU only has 4 cores and no hyperthreading:

https://ark.intel.com/products/42915/Intel-Core-i5-750-Proce...

dmidecode seems to give more accurate info for this:

    $ sudo dmidecode -t processor | grep 'Count:'
    	Core Count: 4
    	Thread Count: 4


It looks like dmidecode also contradicts itself with the hyper threading flag:

    $ sudo dmidecode -t processor | grep -E 'Flags:|HTT|Status|Count'
    	Flags:
		HTT (Multi-threading)
	Status: Populated, Enabled
	Core Count: 4
	Thread Count: 4


Hmmm... yeah that's showing the same on mine too. According to dmidecode, this CPU has hyperthreading.


To quote the Intel Developer Instructions[1] on the HTT flag:

>A value of 0 for HTT indicates there is only a single logical processor in the package and software should assume only a single APIC ID is reserved. A value of 1 for HTT indicates the value in CPUID.1.EBX[23:16] (the Maximum number of addressable IDs for logical processors in this package) is valid for the package.

UPDATE: It appears these flags refer to each initial APIC ID, so it seems the HTT flag value should be 0 in all cases where the overall processor:thread ratio is 1, suggesting there might either be incorrect information in the CPUID instruction for some Intel CPUs or the kernel is not correctly evaluating CPUID.1.EBX[23:16].

Hopefully, someone more versed in CPUs can correct me here.

[1]https://www.intel.com/content/www/us/en/architecture-and-tec...


cpuinfo is probably wrong in this case. Looking at the intel spec sheet: http://ark.intel.com/products/88188/Intel-Core-i5-6600-Proce...


Do you have 8 threads?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: