From owner-svn-src-head@FreeBSD.ORG Thu Apr 29 09:57:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D39E5106566B; Thu, 29 Apr 2010 09:57:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3AC18FC15; Thu, 29 Apr 2010 09:57:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3T9vPuB014002; Thu, 29 Apr 2010 09:57:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3T9vPBR014000; Thu, 29 Apr 2010 09:57:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004290957.o3T9vPBR014000@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 29 Apr 2010 09:57:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207364 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 29 Apr 2010 09:57:25 -0000 Author: kib Date: Thu Apr 29 09:57:25 2010 New Revision: 207364 URL: http://svn.freebsd.org/changeset/base/207364 Log: 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. Noted and reviewed by: alc Tested by: pho MFC after: 2 weeks Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Thu Apr 29 09:55:51 2010 (r207363) +++ head/sys/vm/swap_pager.c Thu Apr 29 09:57:25 2010 (r207364) @@ -378,6 +378,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 * @@ -1131,9 +1139,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); /*