From owner-cvs-all Fri Nov 19 14:47:24 1999 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 8D91E14CF8; Fri, 19 Nov 1999 14:47:21 -0800 (PST) (envelope-from dillon@FreeBSD.org) Received: (from dillon@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id OAA01716; Fri, 19 Nov 1999 14:47:21 -0800 (PST) (envelope-from dillon@FreeBSD.org) Message-Id: <199911192247.OAA01716@freefall.freebsd.org> From: Matt Dillon Date: Fri, 19 Nov 1999 14:47:21 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/i386/include lock.h Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk dillon 1999/11/19 14:47:21 PST Modified files: sys/i386/include lock.h Log: Optimize two cases in the MP locking code. First, it is not necessary to use a locked cmpexg when unlocking a lock that we already hold, since nobody else can touch the lock while we hold it. Second, it is not necessary to use a locked cmpexg when locking a lock that we already hold, for the same reason. These changes will allow MP locks to be used recursively without impacting performance. Modify two procedures that are called only by assembly and are already NOPROF entries to pass a critical argument in %edx instead of on the stack, removing a significant amount of code from the critical path as a consequence. Reviewed by: Alfred Perlstein , Peter Wemm Revision Changes Path 1.11 +3 -4 src/sys/i386/include/lock.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message