News for hackers. Stuff that matters.
Re:It's all about the cores. Why AMD doesn't use HyperThreading by ars on Thursday January 21, 2010 @06:36PM (#1068693)
See http://en.wikipedia.org/wiki/Instruction_level_parallelism

A CPU scheduler (instruction unit) does not schedule threads or processes - instead it schedules instructions (assembly instructions).

A thread might block while waiting for IO (disk, net, user input, etc).

An instruction might block because it's waiting for the cache to load its data, or it might block because it does not have an available execution unit.

A modern CPU has, for example, 4 units that can add, 2 that can multiply, 1 for floating point, another for memory IO, another that does XOR, etc, etc.

If one of those is busy you try to find an instruction that can make use of an idle unit.

It's often hard to find an instruction because they often depend on each other, so you have to do them in order. With hyperthreading you have double the number of available instructions to choose from (and those two instruction streams are independent of each other).

The biggest problem with hyperthreading is the cache. Memory is very slow, so you cache memory locally, with hyperthreeading you have twice as much data to cache, so some data is evicted - this is bad.

Some tasks will be slower because of this, but most won't.

There are no comments on this comment yet.