Hi,

2011/10/12 Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>:
> On 10/12/2011 12:12 AM, Alexis Berlemont wrote:
>> The methods are not the same at that level:
>> - comedi: n * dma_alloc_coherent  + a vmap at the end
>> - analogy:  a big vmalloc + n * page_to_phys(vmalloc_to_page(vaddr)
>
> I do not know if that makes a difference, but the result of
> dma_alloc_coherent is memory physically contiguous, whereas it is not
> the case for memory returned by vmalloc

I don't think comedi guys are using dma_alloc_coherent() for
contiguity: they are asking for PAGE_SIZE many times; they just want
blocks of 4KB (like analogy, I think).
.
>
> dma_alloc_coherent also allows the GFP_DMA32 flag if you want 32 bits
> memory.
The striking point is that the flags used are GFP_KERNEL | __GFP_COMP
not GFP_DMA32... . There might be a bug in Comedi too, which has not
occured yet.
Have you already used __GFP_COMP (/* Add compound page metadata */)?

Many thanks for your help.

Alexis.

>
> --
>                                                                Gilles.
>

_______________________________________________
Xenomai-help mailing list
Xenomai-help@gna.org
https://mail.gna.org/listinfo/xenomai-help

Reply via email to