From owner-freebsd-questions@FreeBSD.ORG Wed Nov 14 18:21:41 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F60C16A468 for ; Wed, 14 Nov 2007 18:21:41 +0000 (UTC) (envelope-from icantthinkofone@charter.net) Received: from mtao01.charter.net (mtao01.charter.net [209.225.8.186]) by mx1.freebsd.org (Postfix) with ESMTP id 2690E13C4BE for ; Wed, 14 Nov 2007 18:21:40 +0000 (UTC) (envelope-from icantthinkofone@charter.net) Received: from aarprv04.charter.net ([10.20.200.74]) by mtao01.charter.net (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20071114182130.IGXV18969.mtao01.charter.net@aarprv04.charter.net> for ; Wed, 14 Nov 2007 13:21:30 -0500 Received: from robs-laptop.com ([71.85.241.27]) by aarprv04.charter.net with ESMTP id <20071114182130.XZEW17353.aarprv04.charter.net@robs-laptop.com> for ; Wed, 14 Nov 2007 13:21:30 -0500 Message-ID: <473B3CA8.1050102@charter.net> Date: Wed, 14 Nov 2007 12:21:28 -0600 From: icantthinkofone User-Agent: Thunderbird 2.0.0.6 (X11/20070914) MIME-Version: 1.0 CC: freebsd-questions@freebsd.org References: <473A8BC4.6000005@charter.net> <473B1C95.70203@charter.net> <200711141722.07732.wundram@beenic.net> In-Reply-To: <200711141722.07732.wundram@beenic.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Chzlrs: 0 Subject: Re: FreeBSD cache memory allocation X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2007 18:21:41 -0000 Heiko Wundram (Beenic) wrote: > Am Mittwoch, 14. November 2007 17:04:37 schrieb icantthinkofone: > >> Ivan Voras wrote: >> >>> icantthinkofone wrote: >>> >>>> Someone I can't stand said this about FreeBSD. Though I know C, I don't >>>> know anything about it and would love to respond. >>>> [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] >>>> >>> Well, I know there's contigmalloc(9) in FreeBSD but you will get a >>> better answer if you ask this question on freebsd-hackers@. >>> >> That's what I thought but not sure if they were equivalent. >> I'm not signed up over there but I will now. Thanks. >> > > That's not entirely true. MmAllocateContiguousMemorySpecifyCache does > something that's currently not (easily) possible with FreeBSD, namely set up > an MTRR entry (i.e. a specific caching state) specifically for the portion of > contiguous memory being allocated (normally, the driver wants to set the > memory to uncached if using this call). > > This is something that the NVIDIA driver development guys have wanted to have > for a long time (for performance reasons) in the FreeBSD kernel, and there's > someone developing a patch to implement this (AFAICT from reading some > websites), but it doesn't seem like it's finished so far. > > Read up on the NVIDIA requirements to develop an accelerated graphics driver > on AMD64 to get more details on this (there's a "workaround" on i386, but > that depends on the specific system's pre-setup MTRR records from the BIOS; > this one of the reasons there's an accelerated graphics driver for i386 and > not for AMD64). > > I thought that might be the case. (I did ask about this on 'hackers'). Is it possible Nvidia is trying to make FreeBSD work like Windows, in a sense? iow, they used this function in their driver and now everyone has to use it? Or is this really a fault of FreeBSD?