summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_page.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2012-10-31 18:07:18 +0000
committerattilio <attilio@FreeBSD.org>2012-10-31 18:07:18 +0000
commitd38d7bb24528def9112ecd75c967b4202e87cc4e (patch)
tree6e28b3206316703630ba5a9b796a652c5c2bf190 /sys/vm/vm_page.c
parent8fbe05091504259bdb07f38b21e970c6f172b8cd (diff)
downloadFreeBSD-src-d38d7bb24528def9112ecd75c967b4202e87cc4e.zip
FreeBSD-src-d38d7bb24528def9112ecd75c967b4202e87cc4e.tar.gz
Rework the known mutexes to benefit about staying on their own
cache line in order to avoid manual frobbing but using struct mtx_padalign. The sole exception being nvme and sxfge drivers, where the author redefined CACHE_LINE_SIZE manually, so they need to be analyzed and dealt with separately. Reviwed by: jimharris, alc
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r--sys/vm/vm_page.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index d3c797d..b2d2a69 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -116,10 +116,10 @@ __FBSDID("$FreeBSD$");
*/
struct vpgqueues vm_page_queues[PQ_COUNT];
-struct vpglocks vm_page_queue_lock;
-struct vpglocks vm_page_queue_free_lock;
+struct mtx_padalign vm_page_queue_mtx;
+struct mtx_padalign vm_page_queue_free_mtx;
-struct vpglocks pa_lock[PA_LOCK_COUNT];
+struct mtx_padalign pa_lock[PA_LOCK_COUNT];
vm_page_t vm_page_array;
long vm_page_array_size;
@@ -298,7 +298,7 @@ vm_page_startup(vm_offset_t vaddr)
MTX_RECURSE);
mtx_init(&vm_page_queue_free_mtx, "vm page free queue", NULL, MTX_DEF);
for (i = 0; i < PA_LOCK_COUNT; i++)
- mtx_init(&pa_lock[i].data, "vm page", NULL, MTX_DEF);
+ mtx_init(&pa_lock[i], "vm page", NULL, MTX_DEF);
/*
* Initialize the queue headers for the hold queue, the active queue,
OpenPOWER on IntegriCloud