Date: Fri, 3 Jan 2014 00:18:38 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r260213 - user/alc/cachefree/sys/vm Message-ID: <201401030018.s030IcfX062584@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401030018.s030IcfX062584>