lkml.org 
[lkml]   [2006]   [Mar]   [12]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 12 Mar 2006 07:49:31 +0200
FromDan Aloni <>
SubjectRe: [PATCH] sata_mv: stabilize for 5081 and other fixes
On Sat, Mar 11, 2006 at 08:45:29PM -0500, Jeff Garzik wrote:
> 
> This is adding a bug.
> 
> The IOMMU worst case requires a split for each s/g entry, due to DMA 
> boundary issues.  See mv_fill_sg() or ata_fill_sg().
> 
> Thus, the above "/ 2" is required.

Okay I figured it out - here we are using the SCSI sg driver, and 
a scatter-gatter entry generated by that driver will never cross 
a page boundery (nor a DMA boundary), because each userspace page 
is mapped into one scatter-gatter entry, so in that case the "/ 2" 
isn't needed. Coming to think about it, that's only valid on x86
and x86_64. Are there other architectures that break that assumption?
I'd still want to be able to read/write 1MB at a time, otherwise 
it would require massive userspace code rewrites in our application,
(limiting it to 0.5MB). Do you have any suggestions about how to do 
that? I mean, it is not trivial to pass 128 entries of 2*PAGE_SIZE 
based on userspace memory.

p.s. I thought scatter-gatter entries are only valid for the page 
they point to, it's good to learn new things :)

-- 
Dan Aloni
da-x@monatomic.org, da-x@colinux.org, da-x@gmx.net, dan@xiv.co.il
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-12 06:51    [from the cache]
©2003-2008