Date: Wed, 28 Dec 2011 20:27:18 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r228936 - head/sys/vm Message-ID: <201112282027.pBSKRIAN023943@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112282027.pBSKRIAN023943>