diff options
author | dillon <dillon@FreeBSD.org> | 1999-11-19 16:49:30 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-11-19 16:49:30 +0000 |
commit | 1ac9471dbc55b5fa42d36aa8041ffbe7f64bf917 (patch) | |
tree | a4124d514335e75961eb168aa446f957cbedfe22 /sys/i386/isa/apic_vector.s | |
parent | 3544d646b5ba034af1430a8d204a232f969894de (diff) | |
download | FreeBSD-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/apic_vector.s')
-rw-r--r-- | sys/i386/isa/apic_vector.s | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/i386/isa/apic_vector.s b/sys/i386/isa/apic_vector.s index 8e7ac03..ca909d9 100644 --- a/sys/i386/isa/apic_vector.s +++ b/sys/i386/isa/apic_vector.s @@ -26,9 +26,8 @@ call _get_isrlock #define REL_FAST_INTR_LOCK \ - pushl $_mp_lock ; /* GIANT_LOCK */ \ - call _MPrellock ; \ - add $4, %esp + movl $_mp_lock, %edx ; /* GIANT_LOCK */ \ + call _MPrellock_edx #endif /* FAST_SIMPLELOCK */ |