From owner-cvs-all Fri Nov 19 8:49:45 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 E65931569F; Fri, 19 Nov 1999 08:49:41 -0800 (PST) (envelope-from dillon@FreeBSD.org) Received: (from dillon@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id IAA76485; Fri, 19 Nov 1999 08:49:41 -0800 (PST) (envelope-from dillon@FreeBSD.org) Message-Id: <199911191649.IAA76485@freefall.freebsd.org> From: Matt Dillon Date: Fri, 19 Nov 1999 08:49:31 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/i386/i386 mplock.s src/sys/i386/include apic.h asnames.h src/sys/i386/isa apic_vector.s ipl.s Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk dillon 1999/11/19 08:49:31 PST Modified files: sys/i386/i386 mplock.s sys/i386/include apic.h asnames.h sys/i386/isa apic_vector.s ipl.s 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.27 +73 -114 src/sys/i386/i386/mplock.s 1.14 +2 -1 src/sys/i386/include/apic.h 1.43 +3 -1 src/sys/i386/include/asnames.h 1.47 +3 -4 src/sys/i386/isa/apic_vector.s 1.32 +3 -4 src/sys/i386/isa/ipl.s To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message