Chunk Heap Support on DMA-HEAP
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest4 patches 26 repliesIn review
- v34 patches 15 repliesSuperseded
- v24 patches 23 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 4 patches | 15 replies | Superseded |
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | mm: cma: introduce gfp flag in cma_alloc instead of no_warndrivers/ drivers/ include/ +5 more | +18 | 7 replies | |
| 2/4 | mm: failfast mode with __GFP_NORETRY in alloc_contig_rangemm/ | +6 | 9 replies | |
| 3/4 | dt-bindings: reserved-memory: Make DMA-BUF CMA heap DT-configurableDocumentation/ | +56 | 3 replies | |
| 4/4 | dma-buf: heaps: add chunk heap to dmabuf heapsdrivers/ drivers/ drivers/ | +501 | 7 replies |
Reviews trailers per patch
2 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Suren Baghdasaryan | David Hildenbrand |
|---|---|---|
| 1/4 | R-b R-b | A-b |
| 2/4 | ||
| 3/4 | ||
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/4] Chunk Heap Support on DMA-HEAP
This patchset introduces a new dma heap, "chunk-heap" that makes it easy to perform the bulk allocation of high order pages. It has been created to help optimize the 4K/8K HDR video playback with secure DRM HW to protect contents on memory. The HW needs physically contiguous memory chunks(e.g, 64K) up to several hundred MB memory.
To make such high-order big bulk allocations work, chunk-heap uses CMA area. To avoid CMA allocation long stall on blocking pages(e.g., page writeback and/or page locking), it uses failfast mode of the CMA API(i.e., __GFP_NORETRY) so it will continue to find easy migratable pages in different pageblocks without stalling. At last resort, it will allow the blocking only if it couldn't find the available memory in the end.
First two patches introduces the failfast mode as __GFP_NORETRY in alloc_contig_range and the allow to use it from the CMA API. Third patch introduces device tree syntax for chunk-heap to bind the specific CMA area with chunk-heap.
Finally, last patch implements chunk-heap as dma-buf heap.
* since v3 - https://lore.kernel.org/linux-mm/[email protected]/
* use prefix for chunk-name - John
* fix yamllint error - Rob
* add reviewed-by - Suren
* since v2 - https://lore.kernel.org/linux-mm/[email protected]/
* introduce gfp_mask with __GFP_NORETRY on cma_alloc - Michal
* do not expoert CMA APIs - Christoph
* use compatible string for DT instead of dma-heap specific property - Hridya
* Since v1 - https://lore.kernel.org/linux-mm/[email protected]/
* introduce alloc_contig_mode - David
* use default CMA instead of device tree - John
Hyesoo Yu (2):
dt-bindings: reserved-memory: Make DMA-BUF CMA heap DT-configurable
dma-buf: heaps: add chunk heap to dmabuf heaps
Minchan Kim (2):
mm: cma: introduce gfp flag in cma_alloc instead of no_warn
mm: failfast mode with __GFP_NORETRY in alloc_contig_range
.../reserved-memory/dma_heap_chunk.yaml | 56 ++ drivers/dma-buf/heaps/Kconfig | 8 + drivers/dma-buf/heaps/Makefile | 1 + drivers/dma-buf/heaps/chunk_heap.c | 492 ++++++++++++++++++ drivers/dma-buf/heaps/cma_heap.c | 2 +- drivers/s390/char/vmcp.c | 2 +- include/linux/cma.h | 2 +- kernel/dma/contiguous.c | 3 +- mm/cma.c | 12 +- mm/cma_debug.c | 2 +- mm/hugetlb.c | 6 +- mm/page_alloc.c | 8 +- mm/secretmem.c | 3 +- 13 files changed, 581 insertions(+), 16 deletions(-) create mode 100644 Documentation/devicetree/bindings/reserved-memory/dma_heap_chunk.yaml create mode 100644 drivers/dma-buf/heaps/chunk_heap.c
Signature · 1 line
2.30.0.296.g2bfb1c46d8-goog