From owner-svn-src-head@FreeBSD.ORG Sun Jun 14 05:23:40 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60EC3463; Sun, 14 Jun 2015 05:23:40 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F4F0A1D; Sun, 14 Jun 2015 05:23:40 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5E5NePl059453; Sun, 14 Jun 2015 05:23:40 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5E5NebT059452; Sun, 14 Jun 2015 05:23:40 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201506140523.t5E5NebT059452@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 14 Jun 2015 05:23:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284376 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2015 05:23:40 -0000 Author: alc Date: Sun Jun 14 05:23:39 2015 New Revision: 284376 URL: https://svnweb.freebsd.org/changeset/base/284376 Log: As the next step in eliminating PG_CACHE pages, free rather than cache pages in vm_pageout_scan(). The reactivation rate of cache pages created by vm_pageout_scan() is extremely low; typically no more than 0.5% to 2.25% of the pages are ever reactivated. At the same time, caching pages is more expensive than freeing them. For example, in a test with PostgreSQL, this change reduced the amount of time spent in the inactive queue scan by 1/6. Differential Revision: https://reviews.freebsd.org/D2805 Reviewed by: kib Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sun Jun 14 05:12:48 2015 (r284375) +++ head/sys/vm/vm_pageout.c Sun Jun 14 05:23:39 2015 (r284376) @@ -1233,10 +1233,10 @@ vm_pageout_scan(struct vm_domain *vmd, i --page_shortage; } else if (m->dirty == 0) { /* - * Clean pages can be placed onto the cache queue. - * This effectively frees them. + * Clean pages can be freed. */ - vm_page_cache(m); + vm_page_free(m); + PCPU_INC(cnt.v_dfree); --page_shortage; } else if ((m->flags & PG_WINATCFLS) == 0 && pass < 2) { /*