From owner-svn-src-user@FreeBSD.ORG Fri Jan 3 00:18:38 2014 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6E5B9A; Fri, 3 Jan 2014 00:18:38 +0000 (UTC) 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D310C122E; Fri, 3 Jan 2014 00:18:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s030IctA062585; Fri, 3 Jan 2014 00:18:38 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s030IcfX062584; Fri, 3 Jan 2014 00:18:38 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201401030018.s030IcfX062584@svn.freebsd.org> From: Alan Cox Date: Fri, 3 Jan 2014 00:18:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r260213 - user/alc/cachefree/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jan 2014 00:18:39 -0000 Author: alc Date: Fri Jan 3 00:18:38 2014 New Revision: 260213 URL: http://svnweb.freebsd.org/changeset/base/260213 Log: Free the page instead of caching it in vm_pageout_scan(). Sponsored by: EMC / Isilon Storage Division Modified: user/alc/cachefree/sys/vm/vm_pageout.c Modified: user/alc/cachefree/sys/vm/vm_pageout.c ============================================================================== --- user/alc/cachefree/sys/vm/vm_pageout.c Fri Jan 3 00:17:52 2014 (r260212) +++ user/alc/cachefree/sys/vm/vm_pageout.c Fri Jan 3 00:18:38 2014 (r260213) @@ -1095,29 +1095,21 @@ vm_pageout_scan(struct vm_domain *vmd, i /* * If the page appears to be clean at the machine-independent * layer, then remove all of its mappings from the pmap in - * anticipation of placing it onto the cache queue. If, - * however, any of the page's mappings allow write access, - * then the page may still be modified until the last of those - * mappings are removed. + * anticipation of freeing it. If, however, any of the page's + * mappings allow write access, then the page may still be + * modified until the last of those mappings are removed. */ vm_page_test_dirty(m); if (m->dirty == 0 && object->ref_count != 0) pmap_remove_all(m); - if (m->valid == 0) { + if (m->dirty == 0) { /* - * Invalid pages can be easily freed + * Invalid pages must be clean. */ vm_page_free(m); PCPU_INC(cnt.v_dfree); --page_shortage; - } else if (m->dirty == 0) { - /* - * Clean pages can be placed onto the cache queue. - * This effectively frees them. - */ - vm_page_cache(m); - --page_shortage; } else if ((m->flags & PG_WINATCFLS) == 0 && pass < 2) { /* * Dirty pages need to be paged out, but flushing