misc/93887: cpu_spinwait calls missing

Kris Kennaway kris at obsecurity.org
Mon Feb 27 15:30:11 PST 2006


The following reply was made to PR kern/93887; it has been noted by GNATS.

From: Kris Kennaway <kris at obsecurity.org>
To: Arthur Hartwig <Arthur.Hartwig at nokia.com>
Cc: freebsd-gnats-submit at FreeBSD.org
Subject: Re: misc/93887: cpu_spinwait calls missing
Date: Mon, 27 Feb 2006 18:29:44 -0500

 --azLHFNyN32YCQGCU
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Mon, Feb 27, 2006 at 06:42:08AM +0000, Arthur Hartwig wrote:
 >=20
 > >Number:         93887
 > >Category:       misc
 > >Synopsis:       cpu_spinwait calls missing
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    freebsd-bugs
 > >State:          open
 > >Quarter:       =20
 > >Keywords:      =20
 > >Date-Required:
 > >Class:          sw-bug
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Mon Feb 27 06:50:04 GMT 2006
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Arthur Hartwig
 > >Release:        6.1-BETA1
 > >Organization:
 > Nokia
 > >Environment:
 > oz-net-11# uname -a
 > FreeBSD oz-net-11.nes.nokia.com 6.1-BETA1 FreeBSD 6.1-BETA1 #4: Tue Feb 2=
 1 14:01:31 EST 2006     root at oz-net-11.nes.nokia.com:/usr/src/sys/amd64/com=
 pile/oz-net-11  amd64
 >=20
 >=20
 > >Description:
 > There are five busy wait loops in kern/subr_smp.c which would be more "mu=
 lti-processor friendly" on i386 and amd64 architectures if they included a =
 call to cpu_spinwait(). On these architectures the cpu_spinwait() executes =
 a pause instruction which the Intel IA32 architecture manual says "improves=
  the performance of spin wait loops."
 >=20
 > Loops which could include the call to cpu_spinwait() occur in stop_cpus()=
 , stop_cpus_nmi(), restart_cpus(), and two in smp_rendezvous_action()
 
 Why would you want to do this in stop_cpus(), stop_cpus_nmi() and
 restart_cpus()?  They're used e.g. as preparation to break into/out of
 the debugger, and AFAICT they're not in the critical path for
 anything.
 
 Not sure about smp_rendezvous_action(), maybe that one is OK.
 
 Kris
 --azLHFNyN32YCQGCU
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.2.1 (FreeBSD)
 
 iD8DBQFEA4toWry0BWjoQKURAnY6AKCB8OcLLCuyOhj6F2dONXP/DziU9gCeLtpx
 Gtep/M+rzW40uV8Xr6QgGAI=
 =lNp4
 -----END PGP SIGNATURE-----
 
 --azLHFNyN32YCQGCU--


More information about the freebsd-bugs mailing list