diff options
author | Matthew Dillon <dillon@FreeBSD.org> | 1999-11-19 16:49:30 +0000 |
---|---|---|
committer | Matthew Dillon <dillon@FreeBSD.org> | 1999-11-19 16:49:30 +0000 |
commit | cd906fe3de95dfa7549f036f05b5a63e4bdfe07a (patch) | |
tree | a4124d514335e75961eb168aa446f957cbedfe22 /sys/i386/include/apicreg.h | |
parent | d627ab83982688a7a1e0dcf78e393138b51e4144 (diff) | |
download | src-cd906fe3de95dfa7549f036f05b5a63e4bdfe07a.tar.gz src-cd906fe3de95dfa7549f036f05b5a63e4bdfe07a.zip |
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>
Notes
Notes:
svn path=/head/; revision=53425
Diffstat (limited to 'sys/i386/include/apicreg.h')
-rw-r--r-- | sys/i386/include/apicreg.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/i386/include/apicreg.h b/sys/i386/include/apicreg.h index 38c70709e7c2..be9de4f8fe1f 100644 --- a/sys/i386/include/apicreg.h +++ b/sys/i386/include/apicreg.h @@ -223,6 +223,7 @@ typedef struct IOAPIC ioapic_t; /* XXX these 2 don't really belong here... */ #define COUNT_FIELD 0x00ffffff /* count portion of the lock */ +#define CPU_FIELD 0xff000000 /* cpu portion of the lock */ #define FREE_LOCK 0xffffffff /* value of lock when free */ /* |