[TriLUG] Questions about Threading

John F Davis johndavi at us.ibm.com
Tue Mar 26 15:28:58 EST 2002


Nope insignificant.  The extra time to process the spinlock code becomes
insignificant when
the number of cpus in use increases.    The more cpu's the more the less
context switches.  The less
you execute spinlocks.

John Franklin <franklin at elfie.org>@trilug.org on 03/26/2002 03:03:16 PM

Please respond to trilug at trilug.org

Sent by:    trilug-admin at trilug.org


To:    trilug at trilug.org
cc:
Subject:    Re: [TriLUG] Questions about Threading



On Tue, Mar 26, 2002 at 02:46:35PM -0500, John F Davis wrote:
> they are not as fast as linux threads, however the extra spin locks
> become insignificant when scaled across multiple cpu's.  This makes sense

I think you mean the spin locks become significant when scaled across
mutiple cpus.  The point of a spin lock, IIRC, is to busy-wait for a
short-short-short period of time with the expectation that the other
process on another CPU that has the lock will let go of it soon.  As
you increase the number of CPUs (and assuming the load is high enough to
make them all active), the odds of another CPU holding the lock
increases.  This is partly why a 2 CPU system tops out at between 1.5x
and 1.8x speed.  The other major reasons having to do with MMU and
on-chip cache invaldiation.

jf
--
John Franklin
franklin at elfie.org
ICBM: N37 12'54", W80 27'14" Z+2100'
_______________________________________________
TriLUG mailing list
    http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ:
    http://www.trilug.org/~lovelace/faq/TriLUG-faq.html





More information about the TriLUG mailing list