From owner-svn-src-all@FreeBSD.ORG Wed Jul 11 01:04:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA0B7106566C; Wed, 11 Jul 2012 01:04:59 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D59D68FC08; Wed, 11 Jul 2012 01:04:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6B14xBV013538; Wed, 11 Jul 2012 01:04:59 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6B14xTq013535; Wed, 11 Jul 2012 01:04:59 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201207110104.q6B14xTq013535@svn.freebsd.org> From: Attilio Rao Date: Wed, 11 Jul 2012 01:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238359 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 01:05:00 -0000 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,