sglist(9)

John Baldwin jhb at freebsd.org
Wed May 20 14:02:27 UTC 2009


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


More information about the freebsd-arch mailing list