summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/ipl.s
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/isa/ipl.s
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/isa/ipl.s')
-rw-r--r--sys/i386/isa/ipl.s5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/i386/isa/ipl.s b/sys/i386/isa/ipl.s
index 964834d..7c1fca1 100644
--- a/sys/i386/isa/ipl.s
+++ b/sys/i386/isa/ipl.s
@@ -174,9 +174,8 @@ doreti_exit:
#error code needed here to decide which lock to release, INTR or giant
#endif
/* release the kernel lock */
- pushl $_mp_lock /* GIANT_LOCK */
- call _MPrellock
- add $4, %esp
+ movl $_mp_lock, %edx /* GIANT_LOCK */
+ call _MPrellock_edx
#endif /* SMP */
.globl doreti_popl_fs
OpenPOWER on IntegriCloud