From 74cb07ed813fc1f1be50beccddabbf364f38d296 Mon Sep 17 00:00:00 2001 From: attilio Date: Wed, 11 Jul 2012 01:04:59 +0000 Subject: 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 --- sys/vm/vm_object.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sys') 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, -- cgit v1.1