aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2003-10-31 18:32:03 +0000
committerAlan Cox <alc@FreeBSD.org>2003-10-31 18:32:03 +0000
commitdc6279b887bf4473d77b898631f74466b5f7a094 (patch)
treef75e0f73a8087a3b725eaa5ffda009a24eb3987c
parent0a913566061712d5aa315f0bdd6746690bcc976a (diff)
- Take advantage of the swap pager locking: Eliminate the use of Giant
from vm_object_madvise(). - Remove excessive blank lines from vm_object_madvise().
Notes
Notes: svn path=/head/; revision=121815
-rw-r--r--sys/vm/vm_object.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 27dd71fa9718..45d78867bb30 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);
}
/*