요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
==============================
Allocating dma-buf using heaps
==============================
Dma-buf Heaps are a way for userspace to allocate dma-buf objects. They are
typically used to allocate buffers from a specific allocation pool, or to share
buffers across frameworks.
Heaps
=====
A heap represents a specific allocator. The Linux kernel currently supports the
following heaps:
- The ``system`` heap allocates virtually contiguous, cacheable, buffers.
- The ``cma`` heap allocates physically contiguous, cacheable,
buffers. Only present if a CMA region is present. Such a region is
usually created either through the kernel commandline through the
``cma`` parameter, a memory region Device-Tree node with the
``linux,cma-default`` property set, or through the ``CMA_SIZE_MBYTES`` or
``CMA_SIZE_PERCENTAGE`` Kconfig options. The heap's name in devtmpfs is
``default_cma_region``. For backwards compatibility, when the
``DMABUF_HEAPS_CMA_LEGACY`` Kconfig option is set, a duplicate node is
created following legacy naming conventions; the legacy name might be
``reserved``, ``linux,cma``, or ``default-pool``.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
개요
1-10Dma-buf Heap은 userspace가 dma-buf object를 allocate하는 방법입니다. 보통 특정 allocation pool에서 buffer를 만들거나 서로 다른 framework 사이에 buffer를 공유할 때 사용합니다.
Heap이 공통 dma-buf object를 공급합니다.
.. SPDX-License-Identifier: GPL-2.0
==============================
Allocating dma-buf using heaps
==============================
Dma-buf Heaps are a way for userspace to allocate dma-buf objects. They are
typically used to allocate buffers from a specific allocation pool, or to share
buffers across frameworks.
지원 heap
11-28Heap 하나는 특정 allocator 하나를 나타냅니다. Linux kernel은 현재 `system` heap과 `cma` heap을 지원합니다.
`system` heap은 virtually contiguous하고 cacheable한 buffer를 allocate합니다.
`cma` heap은 physically contiguous하고 cacheable한 buffer를 allocate하며 CMA region이 있을 때만 나타납니다. CMA region은 kernel command line의 `cma` parameter, `linux,cma-default` property가 설정된 memory-region Device Tree node, 또는 `CMA_SIZE_MBYTES`와 `CMA_SIZE_PERCENTAGE` Kconfig option으로 만듭니다.
`cma` heap의 devtmpfs 이름은 `default_cma_region`입니다. `DMABUF_HEAPS_CMA_LEGACY` Kconfig option을 설정하면 backward compatibility를 위해 legacy naming node가 하나 더 생기며 이름은 `reserved`, `linux,cma`, `default-pool` 중 하나일 수 있습니다.
연속성 및 생성 조건을 비교합니다.
Heaps
=====
A heap represents a specific allocator. The Linux kernel currently supports the
following heaps:
- The ``system`` heap allocates virtually contiguous, cacheable, buffers.
- The ``cma`` heap allocates physically contiguous, cacheable,
buffers. Only present if a CMA region is present. Such a region is
usually created either through the kernel commandline through the
``cma`` parameter, a memory region Device-Tree node with the
``linux,cma-default`` property set, or through the ``CMA_SIZE_MBYTES`` or
``CMA_SIZE_PERCENTAGE`` Kconfig options. The heap's name in devtmpfs is
``default_cma_region``. For backwards compatibility, when the
``DMABUF_HEAPS_CMA_LEGACY`` Kconfig option is set, a duplicate node is
created following legacy naming conventions; the legacy name might be
``reserved``, ``linux,cma``, or ``default-pool``.
요약·해설
dma-buf-heaps.rst:1-28system과 CMA heap에서 dma-buf를 할당하는 방식과 heap 이름을 설명합니다.
원문의 ABI symbol, error code, source path, 수치, code와 줄 좌표를 보존해 전문을 번역했습니다.