diff options
author | dillon <dillon@FreeBSD.org> | 2001-07-04 16:20:28 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2001-07-04 16:20:28 +0000 |
commit | e028603b7e3e4fb35cdf00aab533f3965f4a13cc (patch) | |
tree | 7420cce169451a74c5b87963467a4aeff668ed12 /sys/vm/vm_pager.h | |
parent | 0b028660051eb7abf4306d34e7fec0e7fde86a28 (diff) | |
download | FreeBSD-src-e028603b7e3e4fb35cdf00aab533f3965f4a13cc.zip FreeBSD-src-e028603b7e3e4fb35cdf00aab533f3965f4a13cc.tar.gz |
With Alfred's permission, remove vm_mtx in favor of a fine-grained approach
(this commit is just the first stage). Also add various GIANT_ macros to
formalize the removal of Giant, making it easy to test in a more piecemeal
fashion. These macros will allow us to test fine-grained locks to a degree
before removing Giant, and also after, and to remove Giant in a piecemeal
fashion via sysctl's on those subsystems which the authors believe can
operate without Giant.
Diffstat (limited to 'sys/vm/vm_pager.h')
-rw-r--r-- | sys/vm/vm_pager.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/vm/vm_pager.h b/sys/vm/vm_pager.h index b4511ca..427d103 100644 --- a/sys/vm/vm_pager.h +++ b/sys/vm/vm_pager.h @@ -124,12 +124,12 @@ vm_pager_get_pages( ) { int r; - mtx_assert(&vm_mtx, MA_OWNED); + GIANT_REQUIRED; + r = (*pagertab[object->type]->pgo_getpages)(object, m, count, reqpage); if (r == VM_PAGER_OK && m[reqpage]->valid != VM_PAGE_BITS_ALL) { vm_page_zero_invalid(m[reqpage], TRUE); } - mtx_assert(&vm_mtx, MA_OWNED); return(r); } @@ -141,11 +141,9 @@ vm_pager_put_pages( int flags, int *rtvals ) { - - mtx_assert(&vm_mtx, MA_OWNED); + GIANT_REQUIRED; (*pagertab[object->type]->pgo_putpages) (object, m, count, flags, rtvals); - mtx_assert(&vm_mtx, MA_OWNED); } /* @@ -168,10 +166,9 @@ vm_pager_has_page( ) { boolean_t ret; - mtx_assert(&vm_mtx, MA_OWNED); + GIANT_REQUIRED; ret = (*pagertab[object->type]->pgo_haspage) (object, offset, before, after); - mtx_assert(&vm_mtx, MA_OWNED); return (ret); } @@ -186,11 +183,9 @@ vm_pager_has_page( static __inline void vm_pager_page_unswapped(vm_page_t m) { - - mtx_assert(&vm_mtx, MA_OWNED); + GIANT_REQUIRED; if (pagertab[m->object->type]->pgo_pageunswapped) (*pagertab[m->object->type]->pgo_pageunswapped)(m); - mtx_assert(&vm_mtx, MA_OWNED); } #endif |