From owner-svn-src-head@FreeBSD.ORG Tue Jul 29 10:38:15 2014 Return-Path: Delivered-To: svn-src-head@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 386BF28A; Tue, 29 Jul 2014 10:38:15 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7E85284C; Tue, 29 Jul 2014 10:38:14 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XC4nM-000ICh-9l; Tue, 29 Jul 2014 14:38:12 +0400 Date: Tue, 29 Jul 2014 14:38:12 +0400 From: Slawa Olhovchenkov To: Alan Cox Subject: Re: svn commit: r269134 - head/sys/vm Message-ID: <20140729103812.GA64229@zxy.spb.ru> References: <201407261810.s6QIAIIj049439@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201407261810.s6QIAIIj049439@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 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: Tue, 29 Jul 2014 10:38:15 -0000 On Sat, Jul 26, 2014 at 06:10:18PM +0000, Alan Cox wrote: > Author: alc > Date: Sat Jul 26 18:10:18 2014 > New Revision: 269134 > URL: http://svnweb.freebsd.org/changeset/base/269134 > > Log: > When unwiring a region of an address space, do not assume that the > underlying physical pages are mapped by the pmap. If, for example, the > application has performed an mprotect(..., PROT_NONE) on any part of the > wired region, then those pages will no longer be mapped by the pmap. > So, using the pmap to lookup the wired pages in order to unwire them > doesn't always work, and when it doesn't work wired pages are leaked. > > To avoid the leak, introduce and use a new function vm_object_unwire() > that locates the wired pages by traversing the object and its backing > objects. MFC planed? > At the same time, switch from using pmap_change_wiring() to the recently > introduced function pmap_unwire() for unwiring the region's mappings. > pmap_unwire() is faster, because it operates a range of virtual addresses > rather than a single virtual page at a time. Moreover, by operating on > a range, it is superpage friendly. It doesn't waste time performing > unnecessary demotions. > > Reported by: markj > Reviewed by: kib > Tested by: pho, jmg (arm) > Sponsored by: EMC / Isilon Storage Division