From owner-freebsd-emulation@FreeBSD.ORG Thu Dec 1 08:22:05 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ACD6106564A; Thu, 1 Dec 2011 08:22:05 +0000 (UTC) (envelope-from gperez@entel.upc.edu) Received: from dash.upc.es (dash.upc.es [147.83.2.50]) by mx1.freebsd.org (Postfix) with ESMTP id B735C8FC12; Thu, 1 Dec 2011 08:22:04 +0000 (UTC) Received: from ackerman2.upc.es (ackerman2.upc.es [147.83.2.244]) by dash.upc.es (8.14.1/8.13.1) with ESMTP id pB18M19p030137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 1 Dec 2011 09:22:01 +0100 Received: from portgus.lan ([147.83.40.234]) (authenticated bits=0) by ackerman2.upc.es (8.14.4/8.14.4) with ESMTP id pB18Lwch012042 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 1 Dec 2011 09:22:01 +0100 Message-ID: <4ED73921.8060906@entel.upc.edu> Date: Thu, 01 Dec 2011 09:21:53 +0100 From: =?ISO-8859-1?Q?Gustau_P=E9rez?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111111 Thunderbird/8.0 MIME-Version: 1.0 To: Andriy Gapon References: <4ECF7440.4070300@entel.upc.edu> <4ED6AEFE.4010106@FreeBSD.org> <201111301807.21351.jkim@FreeBSD.org> <201111301827.46079.jkim@FreeBSD.org> <4ED6BDC1.8020600@FreeBSD.org> In-Reply-To: <4ED6BDC1.8020600@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.70 on 147.83.2.244 X-Mail-Scanned: Criba 2.0 + Clamd X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (dash.upc.es [147.83.2.50]); Thu, 01 Dec 2011 09:22:02 +0100 (CET) Cc: Alan Cox , freebsd-emulation@freebsd.org, FreeBSD current , Gleb Kurtsou Subject: Re: Freeze with 10.0 and VirtualBox {4.1.4|4.1.6|4.1.51r38464} X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 08:22:05 -0000 On 01/12/2011 00:35, Andriy Gapon wrote: > on 01/12/2011 01:27 Jung-uk Kim said the following: >> On Wednesday 30 November 2011 06:07 pm, Jung-uk Kim wrote: >>> On Wednesday 30 November 2011 05:32 pm, Andriy Gapon wrote: >>>> on 26/11/2011 18:33 Gleb Kurtsou said the following: >>>>> Using new vm_page_alloc_contig() may be a better option here. >>>>> Can't help with patch, stuck with pre Nov 15 CURRENT myself. >>>> on 27/11/2011 19:09 Alan Cox said the following: >>>>> vm_page_alloc_contig() should be used instead. >>>> My take on the patch: >>>> http://people.freebsd.org/~avg/vbox-10.patch >>>> This is for head only, no check for FreeBSD version. >>> Actually, I did the same thing last night: >>> >>> http://people.freebsd.org/~jkim/patch-src-VBox-Runtime-r0drv-freebs >>> d-memobj-r0drv-freebsd.c >>> >>> This is a drop-in replacement for the patch. The only practical >>> difference I see from yours is I used VM_ALLOC_INTERRUPT instead of >>> VM_ALLOC_NORMAL. I believe this function may be used in interrupt >>> context. FYI, I tried FreeBSD 9 and Fedora 10 without problem. >> BTW, I needed another patch to build virtual-ose-kmod on head: >> >> http://people.freebsd.org/~jkim/patch-src-VBox-HostDrivers-Support-freebsd-SUPDrv-freebsd.c >> >> FYI... > Yep, me too, obviously :-) > Thank you for the complete vm_page_alloc_contig patch! > Thanks for the patch. I'll give it a try. OTOH yesterday I was trying to use vm_page_alloc_contig and trying to understand the allocation classes. I was able to panic the system or in the best case VBoxHeadless was getting a sig11. I was planning to ask the mailing list about them, because even I read vm-design article in the doc section there are things I don't yet understand: First question is, if you set NULL for the vm_object_t (and then VM_ALLOC_NOOBJ must be given or the kernel will panic with INVARIANTS set) how this memory is assigned to the VirtualBox process logical space? Second set of related questions are: why should the pages be wired? and why should the VM_ALLOC_INTERRUPT alloc class be given? Third question is: I see in the patch that rtR0MemObjFreeBSDPhysPageInit is not called if the veersion is less that 1000000, is this because vm_phys_alloc_contig doesn't set the flags on the pages and vm_page_alloc_contig does? Thanks, Gus