Re: [PATCH v1 2/2] dma-mapping-common: add DMA attribute - DMA_ATTR_IOMMU_BYPASS

Shamir Rabinovitch
2015-11-02T21:49:45Z

On Tue, Nov 03, 2015 at 07:13:28AM +1100, Benjamin Herrenschmidt wrote:
>
> Then I would argue for naming this differently. Make it an optional
> hint "DMA_ATTR_HIGH_PERF" or something like that. Whether this is
> achieved via using a bypass or other means in the backend not the
> business of the driver.
>

Correct. This comment was also from internal review :-) Although
currently there is strong opposition to such new attribute.

>
> It will partially only but it's just an example of another way the
> bakcend could provide some improved performances without a bypass.

Just curious..

In the Infiniband case where user application request the driver to DMA
map some random pages they allocated - will your suggestion still
function?

I mean can you use this limited 1:1 mapping window to map any page the
user application choose? How?

At the bypass we just use the physical address of the page (almost as is).
We use the fact that bypass address space cover the whole memory and so we
have mapping for any address.

In IOMMU case we use the IOMMU translation tables and so can map 64 bit
address to some 32 bit address (or less).

In your case it is not clear to me what can we do with such limited 1:1
mapping.

>
> Cheers,
> Ben.
>