Re: [PATCH 08/10] mm: cma: Contiguous Memory Allocator added

2011-06-15 Thread Subash Patel
Hi Arnd, On 06/14/2011 09:33 PM, Arnd Bergmann wrote: On Tuesday 14 June 2011, Michal Nazarewicz wrote: On Tue, 14 Jun 2011 15:49:29 +0200, Arnd Bergmanna...@arndb.de wrote: Please explain the exact requirements that lead you to defining multiple contexts. Some devices may have access only

RE: [PATCH 08/10] mm: cma: Contiguous Memory Allocator added

2011-06-15 Thread Marek Szyprowski
Hello, On Tuesday, June 14, 2011 8:30 PM Arnd Bergmann wrote: On Tuesday 14 June 2011 18:58:35 Michal Nazarewicz wrote: On Tue, 14 Jun 2011 18:03:00 +0200, Arnd Bergmann wrote: For all I know, that is something that is only true for a few very special Samsung devices, Maybe. I'm

Re: [PATCH 08/10] mm: cma: Contiguous Memory Allocator added

2011-06-15 Thread Arnd Bergmann
On Wednesday 15 June 2011 09:11:39 Marek Szyprowski wrote: I see your concerns, but I really wonder how to determine the properties of the global/default cma pool. You definitely don't want to give all available memory o CMA, because it will have negative impact on kernel operation (kernel

RE: [PATCH 08/10] mm: cma: Contiguous Memory Allocator added

2011-06-15 Thread Marek Szyprowski
Hello, On Tuesday, June 14, 2011 3:49 PM Arnd Bergmann wrote: On Monday 13 June 2011, Marek Szyprowski wrote: cm_alloc/free are definitely not meant to be called from device drivers. They should be only considered as a backend for dma-mapping. 'Raw' contiguous memory block doesn't

RE: [PATCH 08/10] mm: cma: Contiguous Memory Allocator added

2011-06-15 Thread Marek Szyprowski
Hello, On Wednesday, June 15, 2011 9:37 AM Arnd Bergmann wrote: On Wednesday 15 June 2011 09:11:39 Marek Szyprowski wrote: I see your concerns, but I really wonder how to determine the properties of the global/default cma pool. You definitely don't want to give all available memory o CMA,

Re: [PATCH 08/10] mm: cma: Contiguous Memory Allocator added

2011-06-15 Thread Arnd Bergmann
On Wednesday 15 June 2011, Marek Szyprowski wrote: If possible I would like to make cma something similar to declare_dma_coherent()friends, so the board/platform/bus startup code will just call declare_dma_contiguous() to enable support for cma for particular devices. Sounds

Re: [PATCH 08/10] mm: cma: Contiguous Memory Allocator added

2011-06-14 Thread Arnd Bergmann
On Monday 13 June 2011, Marek Szyprowski wrote: cm_alloc/free are definitely not meant to be called from device drivers. They should be only considered as a backend for dma-mapping. 'Raw' contiguous memory block doesn't really make sense for the device drivers. What the drivers require is a

Re: [PATCH 08/10] mm: cma: Contiguous Memory Allocator added

2011-06-14 Thread Michal Nazarewicz
On Tue, 14 Jun 2011 15:49:29 +0200, Arnd Bergmann a...@arndb.de wrote: Please explain the exact requirements that lead you to defining multiple contexts. Some devices may have access only to some banks of memory. Some devices may use different banks of memory for different purposes. -- Best

Re: [PATCH 08/10] mm: cma: Contiguous Memory Allocator added

2011-06-14 Thread Arnd Bergmann
On Tuesday 14 June 2011, Michal Nazarewicz wrote: On Tue, 14 Jun 2011 15:49:29 +0200, Arnd Bergmann a...@arndb.de wrote: Please explain the exact requirements that lead you to defining multiple contexts. Some devices may have access only to some banks of memory. Some devices may use

Re: [PATCH 08/10] mm: cma: Contiguous Memory Allocator added

2011-06-14 Thread Michal Nazarewicz
On Tue, 14 Jun 2011 15:49:29 +0200, Arnd Bergmann a...@arndb.de wrote: Please explain the exact requirements that lead you to defining multiple contexts. On Tuesday 14 June 2011, Michal Nazarewicz wrote: Some devices may have access only to some banks of memory. Some devices may use

Re: [PATCH 08/10] mm: cma: Contiguous Memory Allocator added

2011-06-14 Thread Arnd Bergmann
On Tuesday 14 June 2011 18:58:35 Michal Nazarewicz wrote: On Tue, 14 Jun 2011 18:03:00 +0200, Arnd Bergmann wrote: For all I know, that is something that is only true for a few very special Samsung devices, Maybe. I'm just answering your question. :) Ah yes, I forgot that separate

Re: [PATCH 08/10] mm: cma: Contiguous Memory Allocator added

2011-06-14 Thread Michal Nazarewicz
On Tuesday 14 June 2011 18:58:35 Michal Nazarewicz wrote: Is having support for multiple regions a bad thing? Frankly, removing this support will change code from reading context passed as argument to code reading context from global variable. Nothing is gained; functionality is lost. On

RE: [PATCH 08/10] mm: cma: Contiguous Memory Allocator added

2011-06-13 Thread Marek Szyprowski
Hello, On Friday, June 10, 2011 6:22 PM Arnd Bergmann wrote: On Friday 10 June 2011, Marek Szyprowski wrote: The Contiguous Memory Allocator is a set of functions that lets one initialise a region of memory which then can be used to perform allocations of contiguous memory chunks from.

Re: [PATCH 08/10] mm: cma: Contiguous Memory Allocator added

2011-06-10 Thread Arnd Bergmann
On Friday 10 June 2011, Marek Szyprowski wrote: The Contiguous Memory Allocator is a set of functions that lets one initialise a region of memory which then can be used to perform allocations of contiguous memory chunks from. CMA allows for creation of separate contexts. Kernel is allowed to