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/amd64/include/apicreg.h | |
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/amd64/include/apicreg.h')
-rw-r--r-- | sys/amd64/include/apicreg.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/amd64/include/apicreg.h b/sys/amd64/include/apicreg.h index 38c7070..be9de4f 100644 --- a/sys/amd64/include/apicreg.h +++ b/sys/amd64/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 */ /* |