summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_page.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/vm_page.h')
-rw-r--r--sys/vm/vm_page.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h
index b1b1070..662af98 100644
--- a/sys/vm/vm_page.h
+++ b/sys/vm/vm_page.h
@@ -170,7 +170,15 @@ struct vpgqueues {
};
extern struct vpgqueues vm_page_queues[PQ_COUNT];
-extern struct mtx vm_page_queue_free_mtx;
+
+struct vpglocks {
+ struct mtx data;
+ char pad[CACHE_LINE_SIZE - sizeof(struct mtx)];
+} __aligned(CACHE_LINE_SIZE);
+
+extern struct vpglocks vm_page_queue_free_lock;
+
+#define vm_page_queue_free_mtx vm_page_queue_free_lock.data
/*
* These are the flags defined for vm_page.
@@ -258,7 +266,9 @@ PHYS_TO_VM_PAGE(vm_paddr_t pa)
#endif
}
-extern struct mtx vm_page_queue_mtx;
+extern struct vpglocks vm_page_queue_lock;
+
+#define vm_page_queue_mtx vm_page_queue_lock.data
#define vm_page_lock_queues() mtx_lock(&vm_page_queue_mtx)
#define vm_page_unlock_queues() mtx_unlock(&vm_page_queue_mtx)
OpenPOWER on IntegriCloud