LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 05-06-2013, 10:27 PM   #1
dman777
Member
 
Registered: Dec 2010
Distribution: Gentoo
Posts: 223

Rep: Reputation: 8
AMD Cores/Threads/Virtual Cores


I'm trying to refresh my memory... someone told me once that for AMD cpu's in Linux that each thread shows up as a virtual core? Is this true? Or is there something similar in respect to this?
 
Old 05-07-2013, 01:50 AM   #2
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 3,887

Rep: Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774
I don't have a recent AMD CPU to play with, but what I think is behind this is as follows. With Intel, as you move up the range, you move from single simultaneous thread per CPUs core (ie, number of simultaneous threads maxes out at the number of cores) to two simultaneous thread per core CPUs.

Intel calls this hyperthreading.

So, for things like the Celerons and Pentiums, if you have two cores, you have a maximum of two threads that can execute simultaneously. Obviously, you can have more threads than that, but the remaining threads are in stasis until one of the then executing threads is put into stasis and the other gets its day in the sun, and that takes a context switch with all that implies.

With (current??) AMD CPUs, you don't get this 'multi threads per cpu' arrangement at all. You do get what is confusingly a vaguely similar arrangement where there is something called a 'module' which contains two integer CPUs (but only one floating point unit), and that has led the partly-informed to claim that this is the same thing (but it isn't). So, for AMD CPUs, your max number of simultaneous threads is equal to the number of integer CPUs, and there is no 'magic' behind the scenes making one integer CPU look like two to the operating system.

Of course, you could ask why anybody cares about this; after all, isn't total throughput really the only game in town, and if a CPU clocked at some particular clock rate munches through instructions at some particular rate isn't that what is important?

Well, it does have an impact on throughput (Intel's hyperthreading arrangement allows the effect of pipeline stalls to be reduced), so it does, to a limited extent, allow more throughput (but that isn't the same as saying that hyperthreading will always produce more throughput). And, while the hyperthreaded core will look to the OS like two real cores, two real cores would probably have been more effective. And, with all of these arrangements, whether they be multi-core or hyperthreading, they only help if you have enough threads ready and able to be run; if you have enough threads, and all but one are waiting for I/O, say, all you can do with those other threads is wait faster, whether you have lots of cores or hyperthreading to help you do it.
 
Old 05-07-2013, 02:04 AM   #3
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,478

Rep: Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220
yes, here is a quite long, old and interesting (hyper?)thread about it: http://hardforum.com/showthread.php?t=809776
and another site: http://bitsum.com/pl_when_hyperthreading_hurts.php
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can processes/threads move between cores? DavidA Programming 4 08-09-2011 10:10 AM
thread scheduling. is it guaranteed that kernel will run threads on all cores? anilp Linux - Kernel 1 01-26-2011 02:30 PM
[SOLVED] AMD CPU: Athlon II or Phenom II? And how many cores? Jyde Linux - Hardware 43 10-11-2010 10:33 PM
real temperature from amd k10 cores maxx223 Linux - General 3 04-03-2010 04:33 AM
Wich are the differents cores of AMD 64bits CPUs? HellSpawn General 14 02-26-2006 08:39 PM


All times are GMT -5. The time now is 09:12 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration