Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 19th September 2009, 04:10 AM
gerry.butler Offline
Registered User
 
Join Date: Aug 2009
Location: Melbourne, Australia
Posts: 19
windows_98_nt_2000firefox
Does Linux SMP perform at its optimum in Intel Core i7?

This is a general technical question about Symmetric Multiprocessing in relation to the Intel Core i7. (Actually, it's more about Hyperthreading than i7.)

My understanding is that Symmetric Multiprocessing means that the operating system treats all processors as identical, and therefore it can assign a new thread to any free processor.

And that i7 appears to the OS as 8 processors, 0 thru 7.

But from a performance perspective, the 8 processors are not identical, because each core has 1 execution engine plus the ability to store the state of 2 threads. This is, as far as I understand it, the essence of Intel's Hyperthreading. So each execution engine can quickly switch between 2 threads without bothering the OS, but only one thread at a time actually executes.

Suppose, for example, all processors are idle and the OS assigns one thread to processor 0, then has a second thread to assign. Since all free processors are considered identical, the OS could assign the second thread to any free processor, say 1. The result would be that both threads are competing for the same execution engine, while the other 3 cores remain idle.

Is my understanding of SMP correct?

If so, does linux SMP take full advantage of Intel Hyperthreading (which existed also in earlier Intel processors)? That is, does linux SMP assign threads in such a way that it attempts to choose an idle execution engine?

I don't know what algorithm SMP actually uses to choose the processor. For example, it could be the first free processor, or any free processor chosen at random.

How about Windows? How does it handle the situation?

Thanks. Gerry

Edit: I have also posted this question in linuxforums and phoronix forums. I hope this doesn't count as cross-posting, since those forums are not on this site and they have different readership. If it is indeed cross-posting, please let me know and I will avoid doing it in future.

Last edited by gerry.butler; 19th September 2009 at 04:30 AM.
Reply With Quote
  #2  
Old 19th September 2009, 12:10 PM
markkuk Offline
Registered User
 
Join Date: Apr 2005
Location: Finland
Posts: 5,076
linuxfirefox
Quote:
Originally Posted by gerry.butler View Post
So each execution engine can quickly switch between 2 threads without bothering the OS, but only one thread at a time actually executes.
That would be plain old multithreading with hardware assist, not hyperthreading. All modern CPU cores have multiple parallel execution pipelines and a HT core tries to keep the pipelines working at maximum capacity by choosing instructions from two different threads instead of just one.
Quote:
Originally Posted by gerry.butler View Post
If so, does linux SMP take full advantage of Intel Hyperthreading
Yes, Linux understands processor hierarchies of threads, cores and physical packages: http://www.kernel.org/doc/ols/2006/o...es-337-348.pdf
Reply With Quote
  #3  
Old 20th September 2009, 02:30 AM
gerry.butler Offline
Registered User
 
Join Date: Aug 2009
Location: Melbourne, Australia
Posts: 19
windows_98_nt_2000firefox
Hello markkuk

Thank you for the references. It looks like I've got a bit of reading to do. I may get back with some more questions after I've digested this information and whatever else I get hold of.

Someone has also pointed out that in the kernel config there is an option called SMT scheduler support, which "improves the CPU scheduler's decision making when dealing with Intel Pentium 4 chips with HyperThreading at a cost of slightly increased overhead in some places."

One of the wikipedia articles you reference says that multithreading CPUs have been around since the 1950s, and I recall now that the Honeywell 800 series (1958 until about 1970) executed 8 concurrent threads. The processor didn't have a pipeline. It just took 1 instruction in turn from each active thread and executed it.

Thanks. Gerry
Reply With Quote
Reply

Tags
core, intel, linux, optimum, perform, smp

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to perform Cross certification in Linux Mohit gupta Using Fedora 0 19th May 2009 03:51 PM
install linux in Intel core 2 duo + 965 Motherboard ujal Installation and Live Media 2 25th June 2007 09:43 AM
Dual Core Intel + Mac OS X + Linux = Dream PC Firewing1 Wibble 37 18th March 2007 06:21 PM


Current GMT-time: 07:25 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat