From owner-freebsd-bugs@FreeBSD.ORG Mon Feb 27 23:30:10 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E830516A420 for ; Mon, 27 Feb 2006 23:30:10 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 945F943D46 for ; Mon, 27 Feb 2006 23:30:10 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k1RNUAm1006195 for ; Mon, 27 Feb 2006 23:30:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k1RNUAPe006194; Mon, 27 Feb 2006 23:30:10 GMT (envelope-from gnats) Date: Mon, 27 Feb 2006 23:30:10 GMT Message-Id: <200602272330.k1RNUAPe006194@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Kris Kennaway Cc: Subject: Re: misc/93887: cpu_spinwait calls missing X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Kris Kennaway List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Feb 2006 23:30:11 -0000 The following reply was made to PR kern/93887; it has been noted by GNATS. From: Kris Kennaway To: Arthur Hartwig Cc: freebsd-gnats-submit@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@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--