Date: Thu, 13 May 2010 09:26:31 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r208025 - stable/8/sys/vm Message-ID: <201005130926.o4D9QVIi087486@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Thu May 13 09:26:31 2010 New Revision: 208025 URL: http://svn.freebsd.org/changeset/base/208025 Log: MFC r207364: In swap pager, do not free the non-requested pages from the run if they are wired. Kstack pages are wired, this change prepares swap pager for handling of long runs of kstack pages. Modified: stable/8/sys/vm/swap_pager.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/vm/swap_pager.c ============================================================================== --- stable/8/sys/vm/swap_pager.c Thu May 13 03:56:57 2010 (r208024) +++ stable/8/sys/vm/swap_pager.c Thu May 13 09:26:31 2010 (r208025) @@ -374,6 +374,14 @@ static void swp_pager_meta_free(vm_objec static void swp_pager_meta_free_all(vm_object_t); static daddr_t swp_pager_meta_ctl(vm_object_t, vm_pindex_t, int); +static void +swp_pager_free_nrpage(vm_page_t m) +{ + + if (m->wire_count == 0) + vm_page_free(m); +} + /* * SWP_SIZECHECK() - update swap_pager_full indication * @@ -1128,9 +1136,9 @@ swap_pager_getpages(vm_object_t object, vm_page_lock_queues(); for (k = 0; k < i; ++k) - vm_page_free(m[k]); + swp_pager_free_nrpage(m[k]); for (k = j; k < count; ++k) - vm_page_free(m[k]); + swp_pager_free_nrpage(m[k]); vm_page_unlock_queues(); } @@ -1529,7 +1537,7 @@ swp_pager_async_iodone(struct buf *bp) */ m->valid = 0; if (i != bp->b_pager.pg_reqpage) - vm_page_free(m); + swp_pager_free_nrpage(m); else vm_page_flash(m); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005130926.o4D9QVIi087486>