summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2012-11-03 23:03:14 +0000
committerattilio <attilio@FreeBSD.org>2012-11-03 23:03:14 +0000
commitf3501b109e4c598688ec381ebd73e59c45bfa3b0 (patch)
tree6411bccb7372a8d587dd213ecf9a07e5207ee325 /sys/amd64
parent3f3e3a0702399e665a93253ca4b4b31c1754f09b (diff)
downloadFreeBSD-src-f3501b109e4c598688ec381ebd73e59c45bfa3b0.zip
FreeBSD-src-f3501b109e4c598688ec381ebd73e59c45bfa3b0.tar.gz
Rework the known rwlock to benefit about staying on their own
cache line in order to avoid manual frobbing but using struct rwlock_padalign. Reviewed by: alc, jimharris
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/pmap.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index a80fc7b..06b45b2 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -225,16 +225,7 @@ u_int64_t KPML4phys; /* phys addr of kernel level 4 */
static u_int64_t DMPDphys; /* phys addr of direct mapped level 2 */
static u_int64_t DMPDPphys; /* phys addr of direct mapped level 3 */
-/*
- * Isolate the global pv list lock from data and other locks to prevent false
- * sharing within the cache.
- */
-static struct {
- struct rwlock lock;
- char padding[CACHE_LINE_SIZE - sizeof(struct rwlock)];
-} pvh_global __aligned(CACHE_LINE_SIZE);
-
-#define pvh_global_lock pvh_global.lock
+static struct rwlock_padalign pvh_global_lock;
/*
* Data for the pv entry allocation mechanism
OpenPOWER on IntegriCloud