From: Mike Bennett <mbennett@netcom.com>
To: ultralinux@vger.kernel.org
Subject: UltraSPARC lock performance
Date: Sat, 16 May 1998 16:52:55 +0000 [thread overview]
Message-ID: <marc-linux-ultrasparc-90222356531041@msgid-missing> (raw)
Hi -
I've looked with great interest at the UltraLinux codebase; great
accomplishment!
I've recently been doing a deal of performance work on SPARC/Solaris, and
had a suggestion with regards to SMP lock performance.
Currently, I see (based on the 2.1.102 release snapshot shown by the
LXR folks) that the locking primitive used is the ldstub primitive.
I've been doing performance analysis of wait-free algorithms and have
found a very striking performance difference between using ldstub
and the 'cas' (compare-and-swap) uSPARC instruction to implement locking
primitives.
On a single processor, cas outperforms ldstub by a good margin. On an
SMP machine, the difference is extreme. One of the properties of ldstub
on the 2+ cpu uSPARCS is the requirement that ldstub lock the bus; cas
does not have this characteristic.
If you take a simple lock call implemented with 'ldstub' and one with 'cas'
and time it on a 3-way or better system, a graph of execution time shows
a cas primitive having a fairly linear improvement in throughput; however,
ldstub takes a HUGE performance hit on the 3rd cpu and gets progressively
worse as you add cpus. Moral, is, if you use ldstub don't run more than
2 cpus (2 is slightly better performing than one, but nowhere near the
speed of 'cas').
There are sample 'cas' lock implementations in the SPARC v9 architecture
manual (section J?). For a kernel implementation, it might be worthwhile
to check it out for yourself.
Great work; hope this helps -
-mike bennett (mbennett@netcom.com)
next reply other threads:[~1998-05-16 16:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-16 16:52 Mike Bennett [this message]
1998-05-16 19:45 ` UltraSPARC lock performance David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ultrasparc-90222356531041@msgid-missing \
--to=mbennett@netcom.com \
--cc=ultralinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.