[openib-general] [RFC/BUG] libibverbs: DMA vs. CQ race

Roland Dreier rdreier at cisco.com
Wed Jan 10 08:19:58 PST 2007


 > OK, but as far as I know (and I may be wrong here) low level driver
 > doesn't have device node, but libibverbs has one, we don't want to
 > create device node for mthca just to provide mmap() to userspace, or do
 > we?

Not sure what you mean -- mthca already implements mmap() to provide
access to doorbell pages.  It would be no problem to extend that to
allow allocating QPs and CQs via mmap() if we're forced into that.

 > There is no way to make memory coherent after allocation, it have to be
 > allocated coherent, I think the API doesn't exists because it cannot be
 > implemented on all arches, but it is worth asking mm people.

Not sure what you mean here either.  dma_alloc_coherent() already
exists on all architectures, but that's not the end of the story -- if
we remap the memory into userspace then we have to make sure that the
page tables for userspace also make the memory coherent (eg uncached
on non-cache-coherent architectures, or whatever the altix magic is to
avoid ordering problems).  dma_alloc_coherent() only takes care of the
kernel mapping.

 - R.




More information about the general mailing list