Date: Fri, 4 Sep 2009 04:48:12 +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-7@freebsd.org Subject: svn commit: r196807 - in stable/7/sys: . contrib/pf vm Message-ID: <200909040448.n844mCdq054063@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Fri Sep 4 04:48:12 2009 New Revision: 196807 URL: http://svn.freebsd.org/changeset/base/196807 Log: MFC r190912 Previously, when vm_page_free_toq() was performed on a page belonging to a reservation, unless all of the reservation's pages were free, the reservation was moved to the head of the partially-populated reservations queue, where it would be the next reservation to be broken in case the free page queues were emptied. Now, instead, I am moving it to the tail. Very likely this reservation is in the process of being freed in its entirety, so placing it at the tail of the queue makes it more likely that the underlying physical memory will be returned to the free page queues as one contiguous chunk. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/vm/vm_reserv.c Modified: stable/7/sys/vm/vm_reserv.c ============================================================================== --- stable/7/sys/vm/vm_reserv.c Fri Sep 4 01:44:31 2009 (r196806) +++ stable/7/sys/vm/vm_reserv.c Fri Sep 4 04:48:12 2009 (r196807) @@ -138,8 +138,8 @@ static vm_reserv_t vm_reserv_array; * The partially-populated reservation queue * * This queue enables the fast recovery of an unused cached or free small page - * from a partially-populated reservation. The head of this queue is either - * the least-recently-populated or most-recently-depopulated reservation. + * from a partially-populated reservation. The reservation at the head of + * this queue is the least-recently-changed, partially-populated reservation. * * Access to this queue is synchronized by the free page queue lock. */ @@ -209,7 +209,7 @@ sysctl_vm_reserv_partpopq(SYSCTL_HANDLER /* * Reduces the given reservation's population count. If the population count * becomes zero, the reservation is destroyed. Additionally, moves the - * reservation to the head of the partially-populated reservations queue if the + * reservation to the tail of the partially-populated reservations queue if the * population count is non-zero. * * The free page queue lock must be held. @@ -235,7 +235,7 @@ vm_reserv_depopulate(vm_reserv_t rv) vm_reserv_freed++; } else { rv->inpartpopq = TRUE; - TAILQ_INSERT_HEAD(&vm_rvq_partpop, rv, partpopq); + TAILQ_INSERT_TAIL(&vm_rvq_partpop, rv, partpopq); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909040448.n844mCdq054063>