From owner-svn-src-all@FreeBSD.ORG Thu Dec 26 05:46:10 2013 Return-Path: Delivered-To: svn-src-all@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 A4426896; Thu, 26 Dec 2013 05:46:10 +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 904C81223; Thu, 26 Dec 2013 05:46:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQ5kAAh009799; Thu, 26 Dec 2013 05:46:10 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQ5kAoJ009798; Thu, 26 Dec 2013 05:46:10 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201312260546.rBQ5kAoJ009798@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 26 Dec 2013 05:46:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259908 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 05:46:10 -0000 Author: marcel Date: Thu Dec 26 05:46:10 2013 New Revision: 259908 URL: http://svnweb.freebsd.org/changeset/base/259908 Log: For ia64, use pmap_remove_pages() and not pmap_remove(). The problem is that we don't have a good way (yet) to iterate over the mapped pages by virtual address and simply try each page within the range. Given that we call pmap_remove() over the entire 2^63 bytes of address space, it takes a while for pmap_remove to have tried all 2^50 pages. By using pmap_remove_pages() we use the PV list to find all mappings. Change derived from a patch by: alc Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Thu Dec 26 05:22:38 2013 (r259907) +++ head/sys/vm/vm_pageout.c Thu Dec 26 05:46:10 2013 (r259908) @@ -875,6 +875,14 @@ vm_pageout_map_deactivate_pages(map, des tmpe = tmpe->next; } +#ifdef __ia64__ + /* + * Remove all non-wired, managed mappings if a process is swapped out. + * This will free page table pages. + */ + if (desired == 0) + pmap_remove_pages(map->pmap); +#else /* * Remove all mappings if a process is swapped out, this will free page * table pages. @@ -883,6 +891,8 @@ vm_pageout_map_deactivate_pages(map, des pmap_remove(vm_map_pmap(map), vm_map_min(map), vm_map_max(map)); } +#endif + vm_map_unlock(map); } #endif /* !defined(NO_SWAPPING) */