Question

I read a lot about superscalar execution, hyperthreading, vector extension and so on. But how can I find out what units and how many my processor actually has? How many integer, floating, branch prediction, vector units does it have and thus what instructions can be run in parallel?

I know

$ cat /proc/cpuinfo

already shows me number of hyper-threads, available extensions (MMX, SSE, AVX) and more stuff. But I cannot see the available processor units.

Était-ce utile?

La solution

Microarchitectural information (other than the model name and stepping) is not generally provided directly by the hardware (cache and TLB information are exceptions). Architectural information (like what instructions are supported) is necessary to determine how the hardware can be used, microarchitecture only influences performance.

In order to determine microarchitectural details like how many functional units of what types are available, what restrictions are placed on execution, and the latency of operations, one would have to use the model name to look up such information. Perhaps someone maintains a database of such information with convenient look up such that a somewhat simple script could take the model name from /proc/cpuinfo and retrieve the desired information, but I suspect not. Doing the look up manually with web search is possible, but articles on processor microarchitecture tend to use the code names (e.g., Sandy Bridge, Haswell, Piledriver, Jaguar) rather than the marketing name. This means that the search will likely go through a step of indirection, first searching for something like "AMD E-300 microarchitecture" to find that its code name is "Bobcat" and then searching "Bobcat microarchitecture".

(In my opinion articles at Real World Technology are the best for microarchitecture, but AnandTech has decent information on microarchitecture and there are other technology sites that have articles on processor microarchitecture.)

If you are interested in optimization on x86, you are probably already aware of Agner Fog's The microarchitecture of Intel, AMD and VIA CPUs: An optimization guide for assembly programmers and compiler makers, which is a good source for microarchitectural information.

Autres conseils

Take a look at /proc/stat and man 5 proc.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top