Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Apr 2012 23:05:08 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r234776 - in stable/8/sys: i386/conf vm
Message-ID:  <201204282305.q3SN58rR084818@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Sat Apr 28 23:05:08 2012
New Revision: 234776
URL: http://svn.freebsd.org/changeset/base/234776

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/8/sys/vm/vm_reserv.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)

Modified: stable/8/sys/vm/vm_reserv.c
==============================================================================
--- stable/8/sys/vm/vm_reserv.c	Sat Apr 28 22:48:00 2012	(r234775)
+++ stable/8/sys/vm/vm_reserv.c	Sat Apr 28 23:05:08 2012	(r234776)
@@ -466,11 +466,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);
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204282305.q3SN58rR084818>