diff options
author | alc <alc@FreeBSD.org> | 2002-07-13 20:55:21 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-07-13 20:55:21 +0000 |
commit | 828e129a104d290776ee93555930a9c9f53b7bd6 (patch) | |
tree | 112c6c5d9bec2f3e71756f53a17e33836ebc0002 /sys/vm | |
parent | a23831a53890f04214677545c287decb8eb6b6d9 (diff) | |
download | FreeBSD-src-828e129a104d290776ee93555930a9c9f53b7bd6.zip FreeBSD-src-828e129a104d290776ee93555930a9c9f53b7bd6.tar.gz |
o Complete the locking of page queue accesses by vm_page_unwire().
o Assert that the page queues lock is held in vm_page_unwire().
o Make vm_page_lock_queues() and vm_page_unlock_queues() visible
to kernel loadable modules.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_page.c | 2 | ||||
-rw-r--r-- | sys/vm/vm_page.h | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 5d8b807..74eb575 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1285,7 +1285,7 @@ vm_page_unwire(vm_page_t m, int activate) int s; s = splvm(); - + mtx_assert(&vm_page_queue_mtx, MA_OWNED); if (m->wire_count > 0) { m->wire_count--; if (m->wire_count == 0) { diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 066fd8d..17afdb8 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -216,12 +216,8 @@ struct vpgqueues { }; extern struct vpgqueues vm_page_queues[PQ_COUNT]; -extern struct mtx vm_page_queue_mtx; extern struct mtx vm_page_queue_free_mtx; -#define vm_page_lock_queues() mtx_lock(&vm_page_queue_mtx) -#define vm_page_unlock_queues() mtx_unlock(&vm_page_queue_mtx) - #endif /* !defined(KLD_MODULE) */ /* @@ -299,6 +295,9 @@ extern long first_page; /* first physical page number */ #define PHYS_TO_VM_PAGE(pa) \ (&vm_page_array[atop(pa) - first_page ]) +extern struct mtx vm_page_queue_mtx; +#define vm_page_lock_queues() mtx_lock(&vm_page_queue_mtx) +#define vm_page_unlock_queues() mtx_unlock(&vm_page_queue_mtx) #if PAGE_SIZE == 4096 #define VM_PAGE_BITS_ALL 0xff |