Hello,
I'm writing documentation about CMA ( https://wiki.linaro.org/OfficeofCTO/MemoryManagement?action=AttachFile&d... ) and DMA_Buf ( https://wiki.linaro.org/OfficeofCTO/MemoryManagement?action=AttachFile&d... )
The goal is to explain outside the Linaro community how CMA and DMA_Buf works. I have tried to summarize my understanding in few slides and now I need you to review and comment this first draft.
Additionnal info about who is doing what and when it will be delivered are welcome.
Regards, Benjamin
On Tue, Sep 06, 2011 at 02:13:38PM +0200, Benjamin Gaignard wrote:
I'm writing documentation about CMA ( https://wiki.linaro.org/OfficeofCTO/MemoryManagement?action=AttachFile&d... ) and DMA_Buf ( https://wiki.linaro.org/OfficeofCTO/MemoryManagement?action=AttachFile&d... )
The goal is to explain outside the Linaro community how CMA and DMA_Buf works.
This is great work, thanks for putting it together, Benjamin.
Slide 3 of the CMA deck is a bit misleading when it starts by saying "grabs memory on system boot", but it's otherwise a good summary.
Does it make sense to cover what happens when unmoveable pages are requested but there isn't enough memory available to allocate outside of the CMA area?
The DMA buffer slides still need some work to put them in context, as it starts too low-level to help the reader get the big picture -- i.e. what problem are we trying to solve? But I trust you're planning on fleshing that out as you work on the slides.
Can this be a lead-in to actually setting up an area in the wiki which organizes the current status on the various MM-related threads underway? I feel that now that we are putting together integration trees and documentation it would be a good time to invest in making them easy to find.
Benjamin, I was reading this when I saw Kiko's response, so he saved me some effort. Really good. It assumes that you understand the general memory allocator and other memory types, it might be an idea to sketch this out. More comments inline.
Dave
On Tue, 2011-09-06 at 19:40 -0300, Christian Robottom Reis wrote:
On Tue, Sep 06, 2011 at 02:13:38PM +0200, Benjamin Gaignard wrote:
I'm writing documentation about CMA ( https://wiki.linaro.org/OfficeofCTO/MemoryManagement?action=AttachFile&d... ) and DMA_Buf ( https://wiki.linaro.org/OfficeofCTO/MemoryManagement?action=AttachFile&d... )
The goal is to explain outside the Linaro community how CMA and DMA_Buf works.
This is great work, thanks for putting it together, Benjamin.
+1
Slide 3 of the CMA deck is a bit misleading when it starts by saying "grabs memory on system boot", but it's otherwise a good summary.
Does it not grab it at system start up?
Does it make sense to cover what happens when unmoveable pages are requested but there isn't enough memory available to allocate outside of the CMA area?
Fits with my comment about how the whole memory allocator works, including CMA.
The DMA buffer slides still need some work to put them in context, as it starts too low-level to help the reader get the big picture -- i.e. what problem are we trying to solve? But I trust you're planning on fleshing that out as you work on the slides.
Yes, should also cover IOMMU set up / tear down in future, no?
Can this be a lead-in to actually setting up an area in the wiki which organizes the current status on the various MM-related threads underway? I feel that now that we are putting together integration trees and documentation it would be a good time to invest in making them easy to find.
I like this idea. Also, this would make a good whitepaper or a presentation / training at an event.
Many thanks, Dave
Hi,
I have updated slides for CMA and DMA_Buffer. I hope it will make more clear why DMA_Buffer is needed.
Yes CMA grab memory at boot time, mark it with MIGRATE_CMA and give it back to the system.
I don't know what happen when the system don't have enough space to allocate unmovable pages but from the patches comments it is clear that CMA memory can't be used for unmovable allocations. Maybe Marek can answer to this question ?
Additional question: - where can we found git tree with CMA, DMA_Buf and DMA IOMMU ?
Regards, Benjamin
On 07/09/11 19:18, Benjamin Gaignard wrote:
Additional question:
- where can we found git tree with CMA, DMA_Buf and DMA IOMMU ?
Jesse had mentioned he would be creating his own tree with the patches applied - certainly the CMA should be there already based on our discussion.
The tree should be under ~jessebarker/linaro-mm-sig on git.linaro.org.
If not what you expect, then LPC is the reason, and we should see updates when Jesse is back in action.
Cheers,
Forgot to mention:
I have put together a wiki page with information on the Release for the patches to be tested while waiting for the upstreaming to the mainline to happen. The page is https://wiki.linaro.org/OfficeofCTO/MemoryManagement/ReleaseInfo
Thanks, Ilias
On 07/09/11 23:19, Ilias Biris wrote:
On 07/09/11 19:18, Benjamin Gaignard wrote:
Additional question:
- where can we found git tree with CMA, DMA_Buf and DMA IOMMU ?
Jesse had mentioned he would be creating his own tree with the patches applied - certainly the CMA should be there already based on our discussion.
The tree should be under ~jessebarker/linaro-mm-sig on git.linaro.org.
If not what you expect, then LPC is the reason, and we should see updates when Jesse is back in action.
Cheers,
On Wed, Sep 07, 2011 at 11:23:47PM +0300, Ilias Biris wrote:
I have put together a wiki page with information on the Release for the patches to be tested while waiting for the upstreaming to the mainline to happen. The page is https://wiki.linaro.org/OfficeofCTO/MemoryManagement/ReleaseInfo
I saw that, but it really isn't what I'm looking for in terms of a home for this work in the wiki.
Hello Benjamin,
Excellent effort on the slides. On 8 September 2011 01:49, Ilias Biris ilias.biris@linaro.org wrote:
On 07/09/11 19:18, Benjamin Gaignard wrote:
Additional question:
- where can we found git tree with CMA, DMA_Buf and DMA IOMMU ?
Jesse had mentioned he would be creating his own tree with the patches applied - certainly the CMA should be there already based on our discussion.
The tree should be under ~jessebarker/linaro-mm-sig on git.linaro.org.
If not what you expect, then LPC is the reason, and we should see updates when Jesse is back in action.
v1 of dma-buf patch is available on github at https://github.com/sumitsemwal/kernel-omap4/tree/dma-buf-v1; I will post v2 as well there when I publish it out. Based on the discussions @ linaro-mm-sig, you might need to do some changes in your dma_buf slides. I also plan to do a 'user-guide' for subsystems that would use dma-buf for buffer sharing, once the interfaces are a little more concrete.
Cheers,
-- Ilias Biris ilias.biris@linaro.org Project Manager, Linaro M: +358504839608, IRC: ibiris Skype: ilias_biris Linaro.org│ Open source software for ARM SoCs