hyperthreading

With Hyper Threading, threads of one physical core are exchanging via what level of cache L1/L2/L3?

天大地大妈咪最大 提交于 2019-12-01 20:51:04
Does the Hyper Threading allow to use of L1-cache to exchange the data between the two threads, which are executed simultaneously on a single physical core, but in two virtual cores? With the proviso that both belong to the same process, i.e. in the same address space. Page 85 (2-55) - Intel® 64 and IA-32 Architectures Optimization Reference Manual : http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf 2.5.9 Hyper-Threading Technology Support in Intel® Microarchitecture Code Name Nehalem ... Deeper buffering and enhanced resource

How to find physical and logical core number in a kernel module?

℡╲_俬逩灬. 提交于 2019-12-01 16:05:24
Are there kernel functions in Linux that would return the number of the physical core and logical core (in case of Hyperthreading) on which a kernel module is running ? Have a look at the end of include/linux/smp.h : smp_processor_id() gives you the number of the current executing CPU. get_cpu() will do the same and will also disable preemption so that you will stay on that CPU until put_cpu() is called. From user-space, you can use sched_getcpu() or getcpu() to obtain the same information. 来源: https://stackoverflow.com/questions/7315907/how-to-find-physical-and-logical-core-number-in-a-kernel

Why does Hyper-threading get reported as supported on processors without it?

无人久伴 提交于 2019-12-01 03:31:43
I'm trying to gather system information and noticed the following on an Intel Xeon E5420: After executing CPUID(EAX=1) , EDX[28] is set, indicating Hyper-threading support, despite the fact that the processor is listed on the Intel website as not supporting Hyper-threading ( ark.intel.com ) Does anyone have an explanation for this? Here's the definition of that bit according to the Intel Developer's Manual: Max APIC IDs reserved field is Valid. 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

Running simulation with hyperthreading doubles runtime

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 22:38:47
I use a simulation written in python/numpy/cython. Since i need to average over many simulation runs i use the multiprocessing module to run all the individual simulation runs in batches. At the office i have an i7-920 workstation with HT. At home i have an i5-560 without. I thought i could run twice as many instances of the simulation in each batch in the office and cut my running time in half. Surprisingly, the run time of each individual instance was doubled compared to the time it take on my home workstation. That it, running 3 simulation instances in parallel at home would take, say 8

C/C++/Assembly Programatically detect if hyper-threading is active on Windows, Mac and Linux [duplicate]

戏子无情 提交于 2019-11-30 20:31:13
This question already has an answer here: How to Detect the Number of Physical Processors / Cores on Windows, Mac and Linux 13 answers I can already correctly detect the number of logical processors correctly on all three of these platforms. To be able to detect the number of physical processors/cores correctly I'll have to detect if hyperthreading is supported AND active (or enabled if you prefer) and if so divide the number of logical processors by 2 to determine the number of physical processors. Perphaps I should provide an example: A quad core Intel CPU's with hyperthreading enabled has 4

C/C++/Assembly Programatically detect if hyper-threading is active on Windows, Mac and Linux [duplicate]

孤者浪人 提交于 2019-11-30 17:00:28
问题 This question already has answers here : How to Detect the Number of Physical Processors / Cores on Windows, Mac and Linux (14 answers) Closed 6 years ago . I can already correctly detect the number of logical processors correctly on all three of these platforms. To be able to detect the number of physical processors/cores correctly I'll have to detect if hyperthreading is supported AND active (or enabled if you prefer) and if so divide the number of logical processors by 2 to determine the

c# Environment.ProcessorCount does not always return the full number of Logical Processor, why?

大兔子大兔子 提交于 2019-11-30 13:22:29
On my machine, windows 7 - Enterprise with 1 x Intel Xeon E5-1660 0 @ 3.30Ghz (6 cores/cpu with Hyper Threading activated), Environment.ProcessorCount return 12 which is exact. On a Windows Server 2012 with 2 x Intel Xeon E5-2697 v3 @ 2.60GHz (14 cores/cpu with Hyper Threading activated(I think because task manager show: 2 sockets, 28 cores, 56 logical processors)), Environment.ProcessorCount return 28 which appears to us as wrong because 2x14x2 = 56. Why on Windows Server 2012 c# method Environment.ProcessorCount does not return the proper number of logical processors? As Additional

Multicore + Hyperthreading - how are threads distributed?

有些话、适合烂在心里 提交于 2019-11-29 21:28:08
I was reading a review of the new Intel Atom 330, where they noted that Task Manager shows 4 cores - two physical cores, plus two more simulated by Hyperthreading. Suppose you have a program with two threads. Suppose also that these are the only threads doing any work on the PC, everything else is idle. What is the probability that the OS will put both threads on the same core? This has huge implications for program throughput. If the answer is anything other than 0%, are there any mitigation strategies other than creating more threads? I expect there will be different answers for Windows,

c# Environment.ProcessorCount does not always return the full number of Logical Processor, why?

时光毁灭记忆、已成空白 提交于 2019-11-29 19:05:44
问题 On my machine, windows 7 - Enterprise with 1 x Intel Xeon E5-1660 0 @ 3.30Ghz (6 cores/cpu with Hyper Threading activated), Environment.ProcessorCount return 12 which is exact. On a Windows Server 2012 with 2 x Intel Xeon E5-2697 v3 @ 2.60GHz (14 cores/cpu with Hyper Threading activated(I think because task manager show: 2 sockets, 28 cores, 56 logical processors)), Environment.ProcessorCount return 28 which appears to us as wrong because 2x14x2 = 56. Why on Windows Server 2012 c# method

Multicore + Hyperthreading - how are threads distributed?

蓝咒 提交于 2019-11-28 19:00:08
问题 I was reading a review of the new Intel Atom 330, where they noted that Task Manager shows 4 cores - two physical cores, plus two more simulated by Hyperthreading. Suppose you have a program with two threads. Suppose also that these are the only threads doing any work on the PC, everything else is idle. What is the probability that the OS will put both threads on the same core? This has huge implications for program throughput. If the answer is anything other than 0%, are there any mitigation