On Fri, 18 May 2007, David Brownell wrote: > On Friday 18 May 2007, jidong xiao wrote: > > Regarding this, I have one question: > > "except at the beginning and the end, scatter-gather buffers follow page > > boundaries", why? i.e. Is there any specific reason that sg buffers should > > follow page boundaries? Then why the beinging and the end are exceptions? > > You should ask the person who wrote that comment; I can't > make sense of it myself. What's "follow" etc.
I wrote it. Stating it more verbosely: Each entry in a scatter-gather list maps a group of physically contiguous pages. The buffer itself occupies only a portion of those pages, as given by the .offset and .length fields in the entry. For each entry in the list (except possibly the first), .offset is 0 and hence the buffer starts at a page boundary. For each entry in the list (except possibly the last), .offset + .length is equal to the total size of the pages mapped by the entry, and hence the buffer ends at a page boundary. Alan Stern ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel