From owner-freebsd-current@FreeBSD.ORG Sun Oct 5 04:15:16 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABF5CA42; Sun, 5 Oct 2014 04:15:16 +0000 (UTC) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by mx1.freebsd.org (Postfix) with ESMTP id 5056FCA4; Sun, 5 Oct 2014 04:15:15 +0000 (UTC) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile13) with ESMTP id s954FElJ029632; Sun, 5 Oct 2014 13:15:14 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili11) with ESMTP id s954FDR01421; Sun, 5 Oct 2014 13:15:13 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi15) id s954FDCZ024723; Sun, 5 Oct 2014 13:15:13 +0900 Received: from localhost by lomi15.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s954FDZa024711; Sun, 5 Oct 2014 13:15:13 +0900 Date: Sun, 05 Oct 2014 13:15:12 +0900 (JST) Message-Id: <20141005.131512.606074419488263735.okuno.kohji@jp.panasonic.com> To: kostikbel@gmail.com Subject: Re: About pmap_mapdev() & pmap_unmapdev() From: Kohji Okuno In-Reply-To: <20141004155803.GQ26076@kib.kiev.ua> References: <20141004092030.GP26076@kib.kiev.ua> <20141004.205335.1782700760623869892.okuno.kohji@jp.panasonic.com> <20141004155803.GQ26076@kib.kiev.ua> Organization: Panasonic Corporation X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: stable@freebsd.org, freebsd-current@freebsd.org, okuno.kohji@jp.panasonic.com X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Oct 2014 04:15:16 -0000 Hi, > On Sat, Oct 04, 2014 at 08:53:35PM +0900, Kohji Okuno wrote: >> Hi Konstantin, >> >> Thank you for your prompt response. >> I will test and report from next monday. >> >> >> In addtion, I have one question. >> >> In current and 10-stable, is vm_map_delete() called by kva_free()? >> > No, kva_free() only releases the vmem backing, leaving the page >> > tables intact. This is why I only did the stable/9 patch. >> >> Where are PTEs allocated by pmap_mapdev() freed in current and 10-stable? >> Could you please explain me? > They are not freed. The removal of the vmem which covers the address > space managed by corresponding ptes, allows the reuse of both KVA region > and corresponding PTEs in the tables. The only concern with the resident > page tables is to avoid two kva_alloc() to step over each other, and > this is ensured by vmem. I agree that normal pages are reusable. But, since the pages mapped by pmap_mapdev() are concerned with the physicall address of device (For example: video memory), these PTEs aren't reusable, I think. So, should we free these PTEs by pmap_unmapdev()? Best regards, Kohji Okuno