[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensolaris-driver-discuss
Subject:    Re: [driver-discuss] ddi_dma_mem_alloc'ing memory "chunked" to 16k.
From:       Carlos Cumming <tcc_sun29 () thinkthink ! com>
Date:       2007-12-19 22:49:25
Message-ID: 47699FF5.40101 () thinkthink ! com
[Download RAW message or body]

Well.... I used an example of 256, 16k chunks when I asked this 
question. Someone could change a tunable to 16k, 256byte chunks. If they 
did that, the memory handles as percentage of memory allocated would get 
pretty large. The alternative (the one I used) was to allocate one big 
(number of chunks * size of chunks) wad (the official term BTW) of 
memory then split that up into chunksize chunks. If course then you run 
into the possibility that the system just won't give you that much 
contiguous memory....

I suspect it's just a judgment call (i.e., an educated guess) what way 
to go.

my $.02...

carlos

Paul Durrant wrote:
> Somnath kotur wrote:
>> So does that mean we need to allocate different dma
>> handles for each individual chunk (assuming each chunk
>> has different sizes and alignment
>> requirement),dma_alloc the memory and bind the vaddr
>> to the above allocated handle to get the cookies?
>>
>
> Yep.
>
>> instance if i had 36 diff chunks so i would have to
>> allocate 36 diff handles? Can i reuse the same handle
>> after i have allocated one chunk?
>>
>
> You can re-cycle handles once they are unbound. You cannot bind the 
> same handle multiple times.
>
>   Paul

_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic