From owner-freebsd-arch@FreeBSD.ORG Wed May 20 14:02:26 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 EF1C71065771 for ; Wed, 20 May 2009 14:02:26 +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 C00BC8FC20 for ; Wed, 20 May 2009 14:02:26 +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 74AE446B52; Wed, 20 May 2009 10:02:26 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 496E38A026; Wed, 20 May 2009 10:02:25 -0400 (EDT) From: John Baldwin To: Julian Elischer Date: Wed, 20 May 2009 10:02:00 -0400 User-Agent: KMail/1.9.7 References: <200905191458.50764.jhb@freebsd.org> <4A1317C7.4000509@elischer.org> In-Reply-To: <4A1317C7.4000509@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905201002.00533.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 20 May 2009 10:02:25 -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: 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: Wed, 20 May 2009 14:02:27 -0000 On Tuesday 19 May 2009 4:34:15 pm Julian Elischer wrote: > 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). I looked at scatterlist yesterday and it appears to be a bit more DMA-centric whereas sglist is more intended to describe a range of memory pages. However, the APIs are somewhat similar (sg_chain() is a lot like sglist_join() for example). They have a header structure and a list of scatter/gather elemenets which is also very similar. The one thing they do differently is that whereas sglist(9) always uses a single array of scatter/gather list elements of variable length, they allocate "blocks" of scatter/gather list elements and then chain multiple blocks together if needed. -- John Baldwin