diff options
author | alc <alc@FreeBSD.org> | 2003-10-31 18:32:03 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-10-31 18:32:03 +0000 |
commit | be546fdee455a96afdefee10d0bdba8547399f5b (patch) | |
tree | f75e0f73a8087a3b725eaa5ffda009a24eb3987c | |
parent | 448f2f0dfcbda39eebcb5e38f16bbca883acce23 (diff) | |
download | FreeBSD-src-be546fdee455a96afdefee10d0bdba8547399f5b.zip FreeBSD-src-be546fdee455a96afdefee10d0bdba8547399f5b.tar.gz |
- Take advantage of the swap pager locking: Eliminate the use of Giant
from vm_object_madvise().
- Remove excessive blank lines from vm_object_madvise().
-rw-r--r-- | sys/vm/vm_object.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 27dd71f..45d7886 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -977,11 +977,7 @@ vm_object_madvise(vm_object_t object, vm_pindex_t pindex, int count, int advise) if (object == NULL) return; - - mtx_lock(&Giant); - end = pindex + count; - /* * Locate and adjust resident pages */ @@ -1002,16 +998,13 @@ shadowlookup: goto unlock_tobject; } } - m = vm_page_lookup(tobject, tpindex); - if (m == NULL) { /* * There may be swap even if there is no backing page */ if (advise == MADV_FREE && tobject->type == OBJT_SWAP) swap_pager_freespace(tobject, tpindex, 1); - /* * next object */ @@ -1024,7 +1017,6 @@ shadowlookup: tpindex += OFF_TO_IDX(tobject->backing_object_offset); goto shadowlookup; } - /* * If the page is busy or not in a normal active state, * we skip it. If the page is not managed there are no @@ -1074,7 +1066,6 @@ shadowlookup: unlock_tobject: VM_OBJECT_UNLOCK(tobject); } - mtx_unlock(&Giant); } /* |