From owner-freebsd-hackers@FreeBSD.ORG Tue May 11 15:58:40 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC0A5106564A for ; Tue, 11 May 2010 15:58:40 +0000 (UTC) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.ntu-kpi.kiev.ua (comsys.kpi.ua [77.47.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7D02E8FC12 for ; Tue, 11 May 2010 15:58:40 +0000 (UTC) Received: from pm513-1.comsys.kpi.ua ([10.18.52.101] helo=pm513-1.comsys.ntu-kpi.kiev.ua) by comsys.ntu-kpi.kiev.ua with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1OBrqx-0004Ua-9T; Tue, 11 May 2010 18:58:39 +0300 Received: by pm513-1.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1001) id 811011CC44; Tue, 11 May 2010 18:58:39 +0300 (EEST) Date: Tue, 11 May 2010 18:58:39 +0300 From: Andrey Simonenko To: Evan Geller Message-ID: <20100511155839.GA90132@pm513-1.comsys.ntu-kpi.kiev.ua> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Authenticated-User: simon@comsys.ntu-kpi.kiev.ua X-Authenticator: plain X-Invalid-HELO: Host impersonating [comsys.ntu-kpi.kiev.ua] X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) X-Exim-Version: 4.63 (build at 06-Jan-2007 23:14:37) X-Date: 2010-05-11 18:58:39 X-Connected-IP: 10.18.52.101:28058 X-Message-Linecount: 34 X-Body-Linecount: 19 X-Message-Size: 1819 X-Body-Size: 1152 Cc: freebsd-hackers@freebsd.org Subject: Re: Recursion in the UVA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2010 15:58:40 -0000 On Mon, May 10, 2010 at 11:42:26AM -0700, Evan Geller wrote: > I'm a bit confused how recursion in the UVA works. vm_map_entries are > allocated from a vm_map_entry zone, but if the vm_map_entry slabs are > full and it needs to allocate a vm_map_entry to satisfy the mapping, > there would seem to be a starvation. I also see a uk_recurse field per There are two types of UMA zones for vm_map_entry structures. One is used for system maps (kmapentzone) and another one is used for regular maps (mapentzone). When kmapentzone is created it got a flag that force it to get new items only from items it owns. Some items are preallocated for kmapentzone on startup and later kmapentzone gets own object, from which it will take new items. So, all items for kmapentzone will be taken from an object that was already inserted in kernel_map. For the mapentzone (for regular vm_map_entry structures) items are taken as usual and new vm_map_entry structures can be created for these allocations, but required extra vm_map_entry will be allocated from kmapentzone (since it will belong to some system map) that use own object with own pages for its items.