summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2012-07-11 01:04:59 +0000
committerattilio <attilio@FreeBSD.org>2012-07-11 01:04:59 +0000
commit74cb07ed813fc1f1be50beccddabbf364f38d296 (patch)
treef66b08b292963a852a7f235080f6350481fb3270 /sys/vm/vm_object.c
parentcd114c7451665121d4e5e6ff92d35dcd4f6d76f1 (diff)
downloadFreeBSD-src-74cb07ed813fc1f1be50beccddabbf364f38d296.zip
FreeBSD-src-74cb07ed813fc1f1be50beccddabbf364f38d296.tar.gz
Document the object type movements, related to swp_pager_copy(),
in vm_object_collapse() and vm_object_split(). In collabouration with: alc MFC after: 3 days
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r--sys/vm/vm_object.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 881c344..7ff561d 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -1381,6 +1381,12 @@ retry:
/*
* Transfer any cached pages from orig_object to new_object.
+ * If swap_pager_copy() found swapped out pages within the
+ * specified range of orig_object, then it changed
+ * new_object's type to OBJT_SWAP when it transferred those
+ * pages to new_object. Otherwise, new_object's type
+ * should still be OBJT_DEFAULT and orig_object should not
+ * contain any cached pages within the specified range.
*/
if (__predict_false(orig_object->cache != NULL))
vm_page_cache_transfer(orig_object, offidxstart,
@@ -1719,6 +1725,9 @@ vm_object_collapse(vm_object_t object)
* swap_pager_copy() can sleep, in which case
* the backing_object's and object's locks are
* released and reacquired.
+ * Since swap_pager_copy() is being asked to
+ * destroy the source, it will change the
+ * backing_object's type to OBJT_DEFAULT.
*/
swap_pager_copy(
backing_object,
OpenPOWER on IntegriCloud