[ofa-general] MTHCA driver from OFED 1.3a package
Lukas Hejtmanek
xhejtman at ics.muni.cz
Mon Nov 26 05:47:13 PST 2007
On Mon, Nov 26, 2007 at 03:37:33PM +0200, Or Gerlitz wrote:
> OK, I see. So what's needed in order to fix the problem for the
> upstream code, it seems the code is ready to take the path of using
> mthca_alloc_icm_coherent, and your patch just forces it to use this
> practice, correct? Why its correct to remove this assertion?
Ronald believes that using coherent allocation is not the right way. It works
on X86_64 though. But on some other architectures, you can run out of coherent
memory shortly which is the main argument con. The right approach is to use
correct DMA API (which means not to use dma_sync_single on memory not mapped
with dma_map_single), Ronald told he has it in the long term TODO list.
The assertion is applied as allocator is called with coherent=0 and gpf_mask
set to __GPF_HIGHMEM. On X86_64 this is not an issue so the assertion is
removed. The correct way should be with coherent=1 and gpf_mask &=
~__GPF_HIGHMEM.
--
Lukáš Hejtmánek
More information about the general
mailing list