Date: Wed, 11 Jul 2012 01:04:59 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r238359 - head/sys/vm Message-ID: <201207110104.q6B14xTq013535@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207110104.q6B14xTq013535>