From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 14 21:43:21 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D96516A41A for ; Wed, 14 Nov 2007 21:43:21 +0000 (UTC) (envelope-from icantthinkofone@charter.net) Received: from que02.charter.net (que02.charter.net [209.225.8.190]) by mx1.freebsd.org (Postfix) with ESMTP id DF08B13C465 for ; Wed, 14 Nov 2007 21:43:20 +0000 (UTC) (envelope-from icantthinkofone@charter.net) Received: from aarprv02.charter.net ([10.20.200.72]) by mtao05.charter.net (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20071114210206.SPCR29426.mtao05.charter.net@aarprv02.charter.net> for ; Wed, 14 Nov 2007 16:02:06 -0500 Received: from robs-laptop.com ([71.85.241.27]) by aarprv02.charter.net with ESMTP id <20071114210206.RFKE495.aarprv02.charter.net@robs-laptop.com> for ; Wed, 14 Nov 2007 16:02:06 -0500 Message-ID: <473B624D.5050904@charter.net> Date: Wed, 14 Nov 2007 15:02:05 -0600 From: icantthinkofone User-Agent: Thunderbird 2.0.0.6 (X11/20070914) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Chzlrs: 0 Subject: Re: FreeBSD cache memory allocation 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: Wed, 14 Nov 2007 21:43:21 -0000 On Wednesday 14 November 2007 11:11:41 am Rob Belics wrote: > > Someone I can't stand said this about FreeBSD. Though I know C, I don't > > know anything about this and would love to respond. My first thought was > > 'contigmalloc' but I'm not sure it's equivalent. > > [QUOTE]The kernel is really lacking some features. They need a method to > > set precise type of memory cache but BSD doesn't provide way to specify > > memory cache. > > > > For that reason MS has the beautiful > > MmAllocateContigousMemorySpecifyCache()[/QUOTE] For kernel memory on i386 and amd64 in 6.3 and later you can use pmap_change_attr() to adjust the caching mode of memory after you have allocated it. It is best used only with allocations that are a multiple of the page size. -- John Baldwin I posted using the wrong email address above. Apparently the person I was referring to was probably talking about he nvidia issue and I see you, John, are working on that pmap function. One question I have is whether nvidia got themselves into a bind (for lack of a better word) because they wrote their drive using Windows functions but now want FreeBSD to create kernel functions "just like Windows" rather than rewriting their own code. Or is all this truly a lacking feature in FreeBSD?