From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 20:34:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA9B2106567B; Sat, 28 Apr 2012 20:34:15 +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 8C2FE8FC14; Sat, 28 Apr 2012 20:34:15 +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 q3SKYFF9079364; Sat, 28 Apr 2012 20:34:15 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SKYFiu079362; Sat, 28 Apr 2012 20:34:15 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201204282034.q3SKYFiu079362@svn.freebsd.org> From: Alan Cox Date: Sat, 28 Apr 2012 20:34:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234771 - in stable/9/sys: i386/conf kern 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: Sat, 28 Apr 2012 20:34:15 -0000 Author: alc Date: Sat Apr 28 20:34:14 2012 New Revision: 234771 URL: http://svn.freebsd.org/changeset/base/234771 Log: MFC r234038 If a page belonging a reservation is cached, then mark the reservation so that it will be freed to the cache pool rather than the default pool. Otherwise, the cached pages within the reservation may be recycled sooner than necessary. Modified: stable/9/sys/vm/vm_reserv.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/vm/vm_reserv.c ============================================================================== --- stable/9/sys/vm/vm_reserv.c Sat Apr 28 20:23:13 2012 (r234770) +++ stable/9/sys/vm/vm_reserv.c Sat Apr 28 20:34:14 2012 (r234771) @@ -464,11 +464,13 @@ vm_reserv_free_page(vm_page_t m) mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); rv = vm_reserv_from_page(m); - if (rv->object != NULL) { - vm_reserv_depopulate(rv); - return (TRUE); - } - return (FALSE); + if (rv->object == NULL) + return (FALSE); + if ((m->flags & PG_CACHED) != 0 && m->pool != VM_FREEPOOL_CACHE) + vm_phys_set_pool(VM_FREEPOOL_CACHE, rv->pages, + VM_LEVEL_0_ORDER); + vm_reserv_depopulate(rv); + return (TRUE); } /*