Date: Sun, 8 Apr 2012 17:00:46 +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: r234038 - head/sys/vm Message-ID: <201204081700.q38H0kjj020585@svn.freebsd.org>
index | next in thread | raw e-mail
Author: alc Date: Sun Apr 8 17:00:46 2012 New Revision: 234038 URL: http://svn.freebsd.org/changeset/base/234038 Log: 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. Reported by: Andrey Zonov Modified: head/sys/vm/vm_reserv.c Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Sun Apr 8 16:26:26 2012 (r234037) +++ head/sys/vm/vm_reserv.c Sun Apr 8 17:00:46 2012 (r234038) @@ -652,11 +652,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); } /*help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204081700.q38H0kjj020585>
