From owner-freebsd-current@FreeBSD.ORG Tue Dec 6 00:08:38 2011 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7208C106566B; Tue, 6 Dec 2011 00:08:38 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh4.mail.rice.edu (mh4.mail.rice.edu [128.42.199.11]) by mx1.freebsd.org (Postfix) with ESMTP id 344118FC14; Tue, 6 Dec 2011 00:08:38 +0000 (UTC) Received: from mh4.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh4.mail.rice.edu (Postfix) with ESMTP id 6BF6A291A37; Mon, 5 Dec 2011 18:08:37 -0600 (CST) Received: from mh4.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh4.mail.rice.edu (Postfix) with ESMTP id 4FDBD2975CD; Mon, 5 Dec 2011 18:08:37 -0600 (CST) X-Virus-Scanned: by amavis-2.6.4 at mh4.mail.rice.edu, auth channel Received: from mh4.mail.rice.edu ([127.0.0.1]) by mh4.mail.rice.edu (mh4.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id ZoiKUXfB7LFa; Mon, 5 Dec 2011 18:08:37 -0600 (CST) Received: from [10.74.20.46] (staff-74-dun20-046.rice.edu [10.74.20.46]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh4.mail.rice.edu (Postfix) with ESMTPSA id D3F1D291A32; Mon, 5 Dec 2011 18:08:36 -0600 (CST) Message-ID: <4EDD5CEB.1020502@rice.edu> Date: Mon, 05 Dec 2011 18:08:11 -0600 From: Alan Cox User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Andriy Gapon References: <4ECF7440.4070300@entel.upc.edu> <20111126163343.GA9150@reks> "<4ED6AEFE.4010106@FreeBSD.org>" <201111301807.21351.jkim@FreeBSD.org> <60ea779052f025798cf65e18c24b7b31@bluelife.at> <47eb9f9b139dd8c59b050f1670a5f18d@bluelife.at> <7c3c9505867f4528af276a571077b9ce@bluelife.at> <4EDCC1C6.3040109@FreeBSD.org> <4EDCCDA2.5070006@FreeBSD.org> <4EDD0644.5030902@rice.edu> <4EDD3F60.8050601@FreeBSD.org> <4EDD442C.9030406@rice.edu> <4EDD47D3.5010803@FreeBSD.org> In-Reply-To: <4EDD47D3.5010803@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alan Cox , freebsd-emulation@FreeBSD.org, FreeBSD current Subject: Re: Freeze with 10.0 and VirtualBox {4.1.4|4.1.6|4.1.51r38464} X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 06 Dec 2011 00:08:38 -0000 On 12/5/2011 4:38 PM, Andriy Gapon wrote: > on 06/12/2011 00:22 Alan Cox said the following: >> On 12/5/2011 4:02 PM, Andriy Gapon wrote: >>> on 05/12/2011 19:58 Alan Cox said the following: >>>> On 12/05/2011 07:56, Andriy Gapon wrote: >>>>> Pages should be marked busy only for some special occasions, wired pages are >>>>> not >>>>> normally busy; the correct explanation is quite a bit longer than this, the >>>>> comment in the code explains VPO_BUSY as "page is in transit". Right now this >>>>> flag doesn't seem tom affect vboxdrv code but it may lead to surprises when >>>>> some >>>>> parts of code that are incorrect now are re-implemented properly: >>>>> http://article.gmane.org/gmane.os.freebsd.devel.emulation/9297 >>>> VM_ALLOC_NOOBJ implies that the returned page does not have VPO_BUSY set. From >>>> the comment at the head of both vm_page_alloc() and vm_page_alloc_contig(): >>>> >>>> * VM_ALLOC_NOOBJ page is not associated with an object and >>>> * should not have the flag VPO_BUSY set >>> Ah, oops, forgot about this. >>> >>>> With regard to the message that the above link points to, I suspect that the >>>> introduction of vm_page_alloc_contig() can be used to address the first problem >>>> that you point out. Specifically, one or more OBJT_PHYS vm objects could be >>>> created and passed to vm_map_find() and then vm_page_alloc_contig() could be >>>> used to fill these vm objects with memory. >>> That's exactly what I was trying to do when I encountered a need for >>> VM_ALLOC_NOOBJ - my object was not NULL. >>> Alan, BTW, is it safe to map an OBJT_PHYS object into the kernel_map and into a >>> user map (or a few of them) at the same time? >>> >> Yes, it is. > Thank you! And another question - what would you recommend as a substitute for > vm_page_alloc_contig in FreeBSD versions that do not have it? All I can think > of is essentially replicating kmem_alloc_contig + contigmapping and allowing a > user-specified object to be used in place of kernel_object. > The right thing to do is to MFC vm_page_alloc_contig(). It shouldn't be that hard to merge it. Alan