From owner-freebsd-arch@FreeBSD.ORG Tue May 19 18:59:01 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 29793106564A for ; Tue, 19 May 2009 18:59:01 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id F3D828FC08 for ; Tue, 19 May 2009 18:59:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id A958D46B8F for ; Tue, 19 May 2009 14:59:00 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 73F018A028 for ; Tue, 19 May 2009 14:58:59 -0400 (EDT) From: John Baldwin To: arch@FreeBSD.org Date: Tue, 19 May 2009 14:58:50 -0400 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905191458.50764.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 19 May 2009 14:58:59 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Subject: 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 18:59:01 -0000 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 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. :) -- John Baldwin