summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/asnames.h
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-11-19 16:49:30 +0000
committerdillon <dillon@FreeBSD.org>1999-11-19 16:49:30 +0000
commit1ac9471dbc55b5fa42d36aa8041ffbe7f64bf917 (patch)
treea4124d514335e75961eb168aa446f957cbedfe22 /sys/i386/include/asnames.h
parent3544d646b5ba034af1430a8d204a232f969894de (diff)
downloadFreeBSD-src-1ac9471dbc55b5fa42d36aa8041ffbe7f64bf917.zip
FreeBSD-src-1ac9471dbc55b5fa42d36aa8041ffbe7f64bf917.tar.gz
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 <bright@wintelcom.net>, Peter Wemm <peter@netplex.com.au>
Diffstat (limited to 'sys/i386/include/asnames.h')
-rw-r--r--sys/i386/include/asnames.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/i386/include/asnames.h b/sys/i386/include/asnames.h
index 8ab8dc7..17b20b5 100644
--- a/sys/i386/include/asnames.h
+++ b/sys/i386/include/asnames.h
@@ -60,7 +60,9 @@
#define _KPTphys KPTphys
#define _MP_GDT MP_GDT
#define _MPgetlock MPgetlock
+#define _MPgetlock_edx MPgetlock_edx
#define _MPrellock MPrellock
+#define _MPrellock_edx MPrellock_edx
#define _MPtrylock MPtrylock
#define _PTD PTD
#define _PTDpde PTDpde
OpenPOWER on IntegriCloud