From owner-freebsd-arch@FreeBSD.ORG Tue May 19 20:45:57 2009 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CC26106566B for ; Tue, 19 May 2009 20:45:57 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outY.internet-mail-service.net (outy.internet-mail-service.net [216.240.47.248]) by mx1.freebsd.org (Postfix) with ESMTP id 157D58FC1B for ; Tue, 19 May 2009 20:45:57 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 85EAB14DD54; Tue, 19 May 2009 13:34:17 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 863852D600F; Tue, 19 May 2009 13:34:15 -0700 (PDT) Message-ID: <4A1317C7.4000509@elischer.org> Date: Tue, 19 May 2009 13:34:15 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: John Baldwin References: <200905191458.50764.jhb@freebsd.org> In-Reply-To: <200905191458.50764.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@FreeBSD.org Subject: Re: sglist(9) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2009 20:45:57 -0000 John Baldwin wrote: > So one of the things I worked on while hacking away at unmapped disk I/O > requests was a little API to manage scatter/gather lists of phyiscal > addresses. The basic premise is that a sglist describes a logical object I was JUST looking at this because of some Linux code I was looking at, that uses a predefined sg list that I think it is getting from Linux. (you may look to se what the Linux sg list code does/has). > that is backed by one or more physical address ranges. To minimize locking, > the sglist objects themselves are immutable once they are shared. The > unmapped disk I/O project is still very much a WIP (and I'm not even working > on any of the really hard bits myself). However, I actually found this > object to be useful for something else I have been working on: the mmap() > extensions for the Nvidia amd64 driver. For the Nvidia patches I have > created a new type of VM object that is very similar to OBJT_DEVICE objects > except that it uses a sglist to determine the physical pages backing the > object instead of calling the d_mmap() method for each page. Anyway, adding > this little API is just the first in a series of patches needed for the > Nvidia driver work. I plan to MFC them to 7.x relatively soon in the hopes > that we can soon have a supported Nvidia driver on amd64 on 7.x. > > The current patches for all the Nvidia stuff is at > http://www.FreeBSD.org/~jhb/pat/ > > This particular patch to just add the sglist(9) API is at > http://www.FreeBSD.org/~jhb/patches/sglist.patch and is slightly more > polished in that it includes a manpage. :) >