Thread (28 messages) 28 messages, 5 authors, 2020-12-03

Re: [PATCH v2 4/4] dma-buf: heaps: add chunk heap to dmabuf heaps

From: Christoph Hellwig <hch@infradead.org>
Date: 2020-12-02 13:55:09
Also in: linux-media, linux-mm, lkml

On Tue, Dec 01, 2020 at 09:51:44AM -0800, Minchan Kim wrote:
From: Hyesoo Yu <redacted>

This patch supports chunk heap that allocates the buffers that
arranged into a list a fixed size chunks taken from CMA.

The chunk heap doesn't use heap-helper although it can remove
duplicated code since heap-helper is under deprecated process.[1]

NOTE: This patch only adds the default CMA heap to allocate chunk
pages. We will add another CMA memory regions to the dmabuf heaps
interface with a later patch (which requires a dt binding)
This new heap seems to largely duplicate the exsting cma_heap.c
file.  Why can't you reuse the code and allow creating different
heaps with different chunk sizes or max numbers of segments?
+config DMABUF_HEAPS_CHUNK_ORDER
+	int "Chunk page order for dmabuf chunk heap"
+	default 4
+	depends on DMABUF_HEAPS_CHUNK
+	help
+	  Set page order of fixed chunk size to allocate from CMA.
Using a config option for this is just broken.  It needs to be runtime
or at very least boot time / DT controllable.
+ * ION Memory Allocator chunk heap exporter
This comment seems wrong.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help