Re: [PATCH v3 25/25] IB/mlx4: Workaround for mlx4_alloc_priv_pages() array allocator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 22, 2016 at 06:50:03PM +0300, Leon Romanovsky wrote:
> According to [1] dma_alloc_coherent doesn't allocate from pool, but
> calls to the __get_free_page().

Use the source luke!  dma_alloc_coherent implementations vary widely.
While some indeed use alloc_pages there are various complications,
especially on non-x86 architectures, or if the dma mask is not the full
64 bits allowed.

> "A DMA pool is an allocation mechanism for small, coherent DMA mappings.
> Mappings obtained from dma_alloc_coherent may have a minimum size of one
> page."

Just because it's not using the dma_pool_* API it could allocate from
various resource constrained pools.  A trivial example for that is
the swiotlb used for address limited devices if no hardware IOMMU
is available, but other architectures have even more complicated
implementations by default.  Take a look at
arch/arm/mm/dma-mapping.c:__dma_alloc() for fun.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux