Author: attilio
Date: Wed Jul 11 01:04:59 2012
New Revision: 238359
URL: http://svn.freebsd.org/changeset/base/238359

Log:
  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

Modified:
  head/sys/vm/vm_object.c

Modified: head/sys/vm/vm_object.c
==============================================================================
--- head/sys/vm/vm_object.c     Tue Jul 10 23:11:52 2012        (r238358)
+++ head/sys/vm/vm_object.c     Wed Jul 11 01:04:59 2012        (r238359)
@@ -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,
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to