Re: [SLUG] Re: Thread distribution on an SMP box

2006-06-27 Thread Ian Wienand
On Tue, Jun 27, 2006 at 05:05:43PM +1000, David Hart wrote:
> AMD has taken out some very interesting patents whereby certain process 
> scheduling operations are moved from the OS into silicon

>From reading that patent and a related paper [1] it seems that the
speculative execution on another processor (or processor thread) is
kicked off on a particular instruction and speculatively executes
instructions from the current thread; the particular patent deals with
getting things out the other end in the right order.

It seems this is very effective for loop based code, where the
compiler can find a lot of other things to do.  But have a look at the
figures for IPC on less helpful code; it doesn't seem there is enough
work being found to make it effective.  The authors argue that it is
simpler hardware, so you could increase clock rate.

You're essentially turning two superscalar processors into one with
speculative execution (Itanium anyone?).  We know that even finding
enough instructions to keep the units on a standard superscalar busy
is almost impossible, so, unless you make the compiler much smarter
there is still a bottle neck of finding enough to do (Itanium
anyone?).

Personally, I think we're all going to have to bite the bullet and
learn to write parallelisable code.  For a good discussion on this,
see "The problem with threads" from May's IEEE Computer [2].

>  http://1url.org/go/1USP6574725

A great site I have found is www.pat2pdf.org which puts these in a
little more readable form.

[1] http://citeseer.ist.psu.edu/krishnan99chipmultiprocessor.html
[2] 
http://www.computer.org/portal/site/computer/index.jsp?pageID=computer_level1_article&TheCat=1005&path=computer/homepage/0506&file=cover.xml&xsl=article.xsl
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] Re: Thread distribution on an SMP box

2006-06-27 Thread David Hart

Carlo Sogono wrote:
I would like to find out how Linux distributes processes in an 
SMP-enabled box with n CPUs. Will the kernel "move" a process from one 
CPU to another if another CPU is idle?


I thought I'd interject some interesting related concepts:

Reverse hyperthreading and other scheduling gymnastics.

AMD has taken out some very interesting patents whereby certain process 
scheduling operations are moved from the OS into silicon; some consider 
these patents to be AMD's "secret weapon" in a future where dozens or 
hundreds of processor cores are likely to be commonplace in many types 
of computers.


http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PALL&p=1&u=%2Fnetahtml%2FPTO%2Fsrchnum.htm&r=1&f=G&l=50&s1=6574725.PN.&OS=PN/6574725&RS=PN/6574725

-or-

 http://1url.org/go/1USP6574725

David

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html