From: Terje Mathisen <Terje.Mathisen@hda.hydro.com>
Subject: Minimum overhead SMP sync (Was: Re: Linux in OpenVMS Galaxy)
Date: 1999/07/20 [thread overview]
Message-ID: <3794C2C1.491AF938@hda.hydro.com> (raw)
In-Reply-To: 7n24fu$k08$1@murrow.corp.sgi.com
(Followups set to comp.arch)
John McCalpin wrote:
> Maybe.... We certainly have proof that some non-trivial codes
> exist that scale to 256p while retaining an SMP programming model.
> These do *not* parallelize each loop independently -- the overheads
> would kill unless you had enormous/impractical problem sizes.
> Instead, the parallelization is on a larger scale. Sometimes this
> requires significant code modification and sometimes it does not.
This is obviously correct, and it made me wonder about what the minimum
possible SMP overhead could be, since this would determine the absolute
limit for parallel granularity.
It seems most modern cpus have some kind of Load Locked/Store
Conditional operation, while x86 is a significant alternative which uses
a conditional exchange.
Using a queue of work-to-do tasks, an idle cpu can grab the next entry
in a linked list by retrieving the head ptr, using this to get the next
ptr from the first entry and then update the head ptr to skip the first
entry.
The critical path here (assuming x86) is the
MOV eax, [first_task]
MOV ebx, [eax.next_task]
LOCK CMPXCHG [head],ebx
sequence which entails a minimum of 4 memory operations, where the first
will probably be a cache miss (since it will be in the L1/L2 cache of
some other cpu), and the actual exchange has to go directly to memory.
With 100 ns for an L2 cache miss or a LOCKed memory operation, I get 300
ns as an absolute minimum. With faster RAM this can be reduced a bit,
but it seems like most big SMP/ccNUMA systems are slower rather than
faster.(?)
300 ns is up to 450 instructions on a 500 MHz PentiumIII, i.e. a fairly
significant time slot.
This means that on an N-way SMP machine, each job has to take
significantly more than N times as long as this, otherwise the
assumption about low lock contention will be broken.
Anyway, my question is this: What is the fastest possible way to
partition out individual tasks in an SMP machine. Can it be done
significantly faster than my snippet above if you have specialized hw?
Terje
--
- <Terje.Mathisen@hda.hydro.com>
Using self-discipline, see http://www.eiffel.com/discipline
"almost all programming can be viewed as an exercise in caching"
next prev parent reply other threads:[~1999-07-20 4:00 UTC|newest]
Thread overview: 174+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-24 4:00 "Compaq Strategic Directions" Presentation Now Posted Terry C. Shannon
1999-06-24 4:00 ` Ben Myers
1999-06-24 4:00 ` David T. Blake
1999-06-24 4:00 ` Greg Lindahl
1999-06-24 4:00 ` Terry C. Shannon
1999-06-25 4:00 ` David Hinds
1999-06-25 4:00 ` Greg Lindahl
1999-06-30 4:00 ` pvdeijk
1999-06-30 4:00 ` Greg Lindahl
1999-06-30 4:00 ` steve
1999-07-01 4:00 ` Vlad Moseanu
1999-06-25 4:00 ` Compaq and Linux (was "Compaq Strategic Directions" Presentation) Larry Kilgallen
1999-06-25 4:00 ` "Compaq Strategic Directions" Presentation Now Posted Toon Moene
1999-06-25 4:00 ` Thor Lancelot Simon
1999-06-25 4:00 ` Art Rice
1999-06-25 4:00 ` Peter Seebach
1999-06-28 4:00 ` Art Rice
1999-06-28 4:00 ` Thor Lancelot Simon
1999-06-28 4:00 ` Peter Seebach
1999-06-28 4:00 ` Jeremy H. Brown
1999-06-29 4:00 ` Thor Lancelot Simon
1999-06-30 4:00 ` Aaron Spink
1999-06-30 4:00 ` Terry C. Shannon
1999-06-30 4:00 ` Greg Lindahl
1999-07-02 4:00 ` Rodger Donaldson
1999-06-28 4:00 ` Art Rice
1999-06-28 4:00 ` Greg Lindahl
1999-06-28 4:00 ` Larry Kilgallen
1999-06-28 4:00 ` Greg Lindahl
1999-06-29 4:00 ` Dave Cherkus
1999-06-29 4:00 ` Dave Cherkus
1999-06-29 4:00 ` David A Froble
1999-06-29 4:00 ` Thor Lancelot Simon
1999-06-30 4:00 ` Aaron Spink
1999-06-29 4:00 ` Thor Lancelot Simon
1999-06-28 4:00 ` Art Rice
1999-06-25 4:00 ` Paul A. Jacobi
1999-06-25 4:00 ` Thor Lancelot Simon
1999-06-28 4:00 ` bgInc. - You'll go where we want you to go
1999-06-28 4:00 ` Thor Lancelot Simon
1999-06-28 4:00 ` Art Rice
1999-06-28 4:00 ` Linux in OpenVMS Galaxy (was " Hoff Hoffman
1999-06-28 4:00 ` Ed Wilts
1999-06-29 4:00 ` Joshua Cope
1999-06-29 4:00 ` JF Mezei
1999-06-29 4:00 ` Jeffrey Keith Boulier
1999-06-30 4:00 ` Greg Pfister
1999-06-30 4:00 ` Jeffrey Keith Boulier
1999-07-01 4:00 ` Guenther Vieth
1999-07-01 4:00 ` Andrew Harrison SUNUK Consultancy
1999-07-02 4:00 ` J. J. Farrell
1999-06-29 4:00 ` Andy Glew
1999-06-29 4:00 ` Clair Grant
1999-06-29 4:00 ` Zalman Stern
1999-06-29 4:00 ` Clair Grant
1999-06-29 4:00 ` Zalman Stern
1999-06-29 4:00 ` David A Froble
1999-06-29 4:00 ` Art Rice
1999-06-29 4:00 ` David A Froble
1999-07-08 4:00 ` Eric Hildum
1999-07-09 4:00 ` Art Rice
1999-07-09 4:00 ` Maynard Handley
1999-07-10 4:00 ` David Cressey
1999-07-10 4:00 ` Andy Glew
1999-07-12 4:00 ` Art Rice
[not found] ` <7m40kn$s62$1@bgtnsc01.worldnet <handleym-0907992042370001@handma3.apple.com>
1999-07-12 4:00 ` Joe Keane
1999-07-14 4:00 ` Chris Morgan
1999-06-29 4:00 ` Greg Lindahl
1999-06-29 4:00 ` David A Froble
1999-06-30 4:00 ` Clair Grant
1999-06-30 4:00 ` David A Froble
1999-07-02 4:00 ` Peter Mayne
1999-07-01 4:00 ` David A Froble
1999-06-29 4:00 ` bgInc. - You'll go where we want you to go
1999-06-29 4:00 ` Larry Kilgallen
1999-06-29 4:00 ` mathog
1999-06-30 4:00 ` Clair Grant
1999-07-01 4:00 ` Burns Fisher
1999-06-28 4:00 ` JF Mezei
1999-06-28 4:00 ` Linux in OpenVMS Galaxy (was Re: "Compaq Strategic Directions" Larry Kilgallen
1999-07-01 4:00 ` Linux in OpenVMS Galaxy (was Re: "Compaq Strategic Directions" Presentation Now Posted Burns Fisher
1999-07-01 4:00 ` Zalman Stern
1999-07-07 4:00 ` Burns Fisher
1999-07-01 4:00 ` JF Mezei
1999-07-01 4:00 ` David A Froble
1999-07-02 4:00 ` Hoff Hoffman
1999-07-07 4:00 ` Burns Fisher
1999-07-07 4:00 ` Andy Glew
1999-07-08 4:00 ` Joshua Cope
1999-07-08 4:00 ` JF Mezei
1999-07-09 4:00 ` Joshua Cope
1999-07-08 4:00 ` Greg Pfister
1999-07-08 4:00 ` Linux in OpenVMS Galaxy (was Re: "Compaq Strategic Directions" Larry Kilgallen
1999-07-08 4:00 ` OpenVMS Galaxy Performance (was Re: Linux in OpenVMS Galaxy ...) Hoff Hoffman
1999-07-08 4:00 ` Linux in OpenVMS Galaxy (was Re: "Compaq Strategic Directions" Presentation Now Posted Bill Todd
1999-07-09 4:00 ` Linux in OpenVMS Galaxy (was Re: "Compaq Strategic Directions" Craig Paul
1999-07-13 4:00 ` Rob Young
1999-07-13 4:00 ` douglass
1999-07-17 4:00 ` David L. Oppenheimer
1999-07-13 4:00 ` Robert Harley
1999-07-13 4:00 ` Greg Pfister
1999-07-14 4:00 ` Andrew Harrison SUNUK Consultancy
1999-07-14 4:00 ` Greg Pfister
1999-07-14 4:00 ` Larry Kilgallen
1999-07-15 4:00 ` Greg Pfister
1999-07-16 4:00 ` Zalman Stern
1999-07-16 4:00 ` Greg Pfister
1999-07-16 4:00 ` Larry Kilgallen
1999-07-16 4:00 ` David A Froble
1999-07-16 4:00 ` Andrew Harrison SUNUK Consultancy
1999-07-16 4:00 ` Jerry Leichter
1999-07-17 4:00 ` Greg Lindahl
1999-07-19 4:00 ` Aaron Spink
1999-07-20 4:00 ` John McCalpin
1999-07-20 4:00 ` Terje Mathisen [this message]
1999-07-20 4:00 ` Minimum overhead SMP sync (Was: Re: Linux in OpenVMS Galaxy) Monty Brandenberg
1999-07-22 4:00 ` Linux in OpenVMS Galaxy (was Re: "Compaq Strategic Directions" devivie
1999-07-22 4:00 ` John McCalpin
1999-07-22 4:00 ` Greg Lindahl
1999-07-23 4:00 ` Toon Moene
1999-07-23 4:00 ` John McCalpin
1999-07-23 4:00 ` Greg Lindahl
1999-07-23 4:00 ` John McCalpin
1999-07-24 4:00 ` Greg Lindahl
1999-07-22 4:00 ` Greg Lindahl
1999-07-26 4:00 ` devivie
1999-07-26 4:00 ` Greg Lindahl
1999-07-22 4:00 ` Greg Lindahl
[not found] ` <7mmr1r$bnp@dfw-ix <378f458e.95871f84@us.ibm.com>
1999-07-16 4:00 ` Larry Kilgallen
[not found] ` <378E4EF4.8f40ac2d@us.ibm.com>
1999-07-16 4:00 ` Larry Kilgallen
[not found] ` <378E4EF4. <378f49b7.5f91a7a3@world.std.com>
1999-07-16 4:00 ` Larry Kilgallen
[not found] ` <378E4EF4. <378F49B7.5F91A7A3@world.std.com>
1999-07-16 4:00 ` Greg Pfister
1999-07-19 4:00 ` Andrew Harrison SUNUK Consultancy
1999-07-20 4:00 ` SMP and Parallelism (was Re: Linux in OpenVMS Galaxy ...) Hoff Hoffman
1999-07-16 4:00 ` Linux in OpenVMS Galaxy (was Re: "Compaq Strategic Directions" Terry C. Shannon
[not found] ` <378E4EF4. <3792eca9.b516f73b@uk.sun.com>
1999-07-19 4:00 ` Galaxy vs. SMP Scaling (was: Linux in OpenVMS Galaxy) Larry Kilgallen
1999-07-19 4:00 ` Andrew Harrison SUNUK Consultancy
1999-07-20 4:00 ` Hoff Hoffman
[not found] ` <378E4EF4. <37935ed5.ccf9255e@uk.sun.com>
1999-07-19 4:00 ` Larry Kilgallen
1999-07-15 4:00 ` Linux in OpenVMS Galaxy (was Re: "Compaq Strategic Directions" Andrew Harrison SUNUK Consultancy
1999-07-16 4:00 ` Alan Davison
[not found] ` <378e5b8e.115324670@news.dialupnet.com>
1999-07-16 4:00 ` Andrew Harrison SUNUK Consultancy
1999-07-16 4:00 ` Jordan Henderson
1999-07-16 4:00 ` Andrew Harrison SUNUK Consultancy
1999-07-16 4:00 ` Mark Schell
1999-07-16 4:00 ` Aaron Spink
1999-07-17 4:00 ` John Santos
1999-07-17 4:00 ` John Santos
[not found] ` <378F409B.B0506900@uk.sun.com <378f5dd5.13ca07a2@uk.sun.com>
1999-07-18 4:00 ` Rob Young
1999-06-26 4:00 ` "Compaq Strategic Directions" Presentation Now Posted Terry C. Shannon
1999-06-25 4:00 ` Aaron Spink
1999-06-25 4:00 ` Art Rice
1999-06-26 4:00 ` Jan Ingvoldstad
1999-06-25 4:00 ` Bill Todd
1999-06-25 4:00 ` CFS; OpenVMS Wizard; WNT (was " Hoff Hoffman
1999-06-25 4:00 ` Larry Kilgallen
1999-06-28 4:00 ` Greg Pfister
1999-06-28 4:00 ` Bill Todd
1999-06-28 4:00 ` Art Rice
1999-06-28 4:00 ` JF Mezei
1999-06-29 4:00 ` Art Rice
1999-06-29 4:00 ` Wolfpack (Was Re: "Compaq Strategic Directions" Presentation Now Posted) Tandem Systeembeheer
1999-06-29 4:00 ` Art Rice
1999-06-29 4:00 ` bgInc. - You'll go where we want you to go
1999-06-29 4:00 ` Terry C. Shannon
1999-06-29 4:00 ` Gary Mason
1999-06-29 4:00 ` Art Rice
1999-06-29 4:00 ` Ron Anthony
1999-06-30 4:00 ` "Compaq Strategic Directions" Presentation Now Posted Greg Pfister
1999-06-28 4:00 ` Greg Lindahl
1999-06-28 4:00 ` Larry Kilgallen
1999-06-26 4:00 ` Kenneth G. Hamilton
1999-06-26 4:00 ` Terry C. Shannon
1999-06-28 4:00 ` Ben Myers
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox