Re: problem with blk_queue_bounce_limit()

David S. Miller
2003-06-07T07:02:50Z

From: David Mosberger <davidm@napali.hpl.hp.com>
Date: Sat, 7 Jun 2003 00:05:06 -0700

But you're creating a new mapping for the old buffer. What if you had
a DMA API implementation which consolidates multiple mapping attempts
of the same buffer into a single mapping entry (along with a reference
count)? That would break the workaround.

I hope nobody is doing this, it would probably break other things
we haven't considered yet.

You can't support all the BIO_MERGE_BOUNDARY stuff properly in
such a scheme. And you _WANT_ to support that when you have an
IOMMU, it shrinks the DMA descriptor addr/len entries a chip
has to DMA for each block I/O considerably.

Isn't the proper fix to (a) get a new buffer, (b) create a mapping for
the new buffer, (c) destroy the mapping for the old buffer. That
should guarantee a different bus address, no matter what the
DMA-mapping implementation.

I suppose this would work, fell free to code this up for the
tg3 driver for me because I certainly lack the time to do this.