Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 2002 00:32:56 +0200
From:      Bernd Walter <ticso@cicely5.cicely.de>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        John Baldwin <jhb@FreeBSD.ORG>, freebsd-alpha@FreeBSD.ORG
Subject:   Re: alpha performance on -current
Message-ID:  <20020904223255.GI87724@cicely5.cicely.de>
In-Reply-To: <15734.29725.515274.183629@grasshopper.cs.duke.edu>
References:  <XFMail.20020904090455.jhb@FreeBSD.org> <15734.29725.515274.183629@grasshopper.cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 04, 2002 at 04:59:09PM -0400, Andrew Gallatin wrote:
> 
> # ./lat_syscall null
> Simple syscall: 2.0178 microseconds
> # ./lat_syscall null
> Simple syscall: 2.0333 microseconds
> # sysctl -w kern.giant.proc=0
> kern.giant.proc: 1 -> 0
> # ./lat_syscall null
> Simple syscall: 1.6360 microseconds
> # ./lat_syscall null
> Simple syscall: 1.6333 microseconds
> 
> 
> Is the locking overhead this bad on x86?  It looks downright
> embarrassing on alpha.  Can anything be done about it?  Are the
> memory barriers in atomic_cmpset_acq_* really needed?  They have the
> look of belt & suspenders code..

They are needed in _acq_ and _rel_ because they are used to build
mutexes.
You even need them on UP systems to enshure instruction order.
Some barriers can be removed in other atomic functions or replaced
with write barriers.
Currently our alpha_wmb() is mappend to mb, which is done because it's
also done in NetBSD - possibly as a workaround for a unnamed problem.

> FWIW, The appended diff to remove them reducess null system call
> latency to 1.6us with kern.giant.proc=1, and 1.4us with
> kern.giant.proc=0.  I'm about to start a buildworld with it, but I
> don't have any SMP boxes.

What kind of CPU is in your XP1000?
On >= 21164 the CPU can be initialised into UP operation so that mb
and wmb fall back to just an contraint on instruction order.
Also locked instructions can be handled inside the CPU in that case.

-- 
B.Walter              COSMO-Project         http://www.cosmo-project.de
ticso@cicely.de         Usergroup           info@cosmo-project.de


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020904223255.GI87724>