From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 20:27:19 2011 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 3A17A106564A; Wed, 28 Dec 2011 20:27:19 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 292018FC08; Wed, 28 Dec 2011 20:27:19 +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 pBSKRJE0023945; Wed, 28 Dec 2011 20:27:19 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBSKRIAN023943; Wed, 28 Dec 2011 20:27:18 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201112282027.pBSKRIAN023943@svn.freebsd.org> From: Alan Cox Date: Wed, 28 Dec 2011 20:27:18 +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: r228936 - 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, 28 Dec 2011 20:27:19 -0000 Author: alc Date: Wed Dec 28 20:27:18 2011 New Revision: 228936 URL: http://svn.freebsd.org/changeset/base/228936 Log: Optimize vm_object_split()'s handling of reservations. Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Wed Dec 28 19:59:54 2011 (r228935) +++ head/sys/vm/vm_object.c Wed Dec 28 20:27:18 2011 (r228936) @@ -1323,6 +1323,21 @@ retry: VM_OBJECT_LOCK(new_object); goto retry; } +#if VM_NRESERVLEVEL > 0 + /* + * If some of the reservation's allocated pages remain with + * the original object, then transferring the reservation to + * the new object is neither particularly beneficial nor + * particularly harmful as compared to leaving the reservation + * with the original object. If, however, all of the + * reservation's allocated pages are transferred to the new + * object, then transferring the reservation is typically + * beneficial. Determining which of these two cases applies + * would be more costly than unconditionally renaming the + * reservation. + */ + vm_reserv_rename(m, new_object, orig_object, offidxstart); +#endif vm_page_lock(m); vm_page_rename(m, new_object, idx); vm_page_unlock(m);