Re: [PATCH] sata_mv: stabilize for 5081 and other fixes

From: Dan Aloni
Date: Sun Mar 12 2006 - 00:46:51 EST


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@xxxxxxxxxxxxx, da-x@xxxxxxxxxxx, da-x@xxxxxxx, dan@xxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/