← Documents Documentation/gpu/panthor.rst GitHub 원문 ↗

Linux 6.18.37 · GPU·DRM

drm/Panthor CSF driver

Panthor fdinfo 통계, sampling bitmask와 internal shmem BO accounting을 설명합니다.

Source pathDocumentation/gpu/panthor.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

panthor.rst:1-56

Panthor fdinfo 통계, sampling bitmask와 internal shmem BO accounting을 설명합니다.

문서 위치
항목
SourceDocumentation/gpu/panthor.rst
분량56 source lines
관련drm-client-usage-stats · panthor-resident-memory

Source와 관련 개념입니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0+
2
3 =========================
4 drm/Panthor CSF driver
5 =========================
6
7 .. _panthor-usage-stats:
8
9 Panthor DRM client usage stats implementation
10 ==============================================
11
12 The drm/Panthor driver implements the DRM client usage stats specification as
13 documented in :ref:`drm-client-usage-stats`.
14
15 Example of the output showing the implemented key value pairs and entirety of
16 the currently possible format options:
17
18 ::
19 pos: 0
20 flags: 02400002
21 mnt_id: 29
22 ino: 491
23 drm-driver: panthor
24 drm-client-id: 10
25 drm-engine-panthor: 111110952750 ns
26 drm-cycles-panthor: 94439687187
27 drm-maxfreq-panthor: 1000000000 Hz
28 drm-curfreq-panthor: 1000000000 Hz
29 panthor-resident-memory: 10396 KiB
30 panthor-active-memory: 10396 KiB
31 drm-total-memory: 16480 KiB
32 drm-shared-memory: 0
33 drm-active-memory: 16200 KiB
34 drm-resident-memory: 16480 KiB
35 drm-purgeable-memory: 0
36
37 Possible `drm-engine-` key names are: `panthor`.
38 `drm-curfreq-` values convey the current operating frequency for that engine.
39
40 Users must bear in mind that engine and cycle sampling are disabled by default,
41 because of power saving concerns. `fdinfo` users and benchmark applications which
42 query the fdinfo file must make sure to toggle the job profiling status of the
43 driver by writing into the appropriate sysfs node::
44
45 echo <N> > /sys/bus/platform/drivers/panthor/[a-f0-9]*.gpu/profiling
46
47 Where `N` is a bit mask where cycle and timestamp sampling are respectively
48 enabled by the first and second bits.
49
50 Possible `panthor-*-memory` keys are: `active` and `resident`.
51 These values convey the sizes of the internal driver-owned shmem BO's that
52 aren't exposed to user-space through a DRM handle, like queue ring buffers,
53 sync object arrays and heap chunks. Because they are all allocated and pinned
54 at creation time, only `panthor-resident-memory` is necessary to tell us their
55 size. `panthor-active-memory` shows the size of kernel BO's associated with
56 VM's and groups currently being scheduled for execution by the GPU.
57

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Panthor CSF usage stats

1-13

`drm/Panthor` CSF driver는 `drm-client-usage-stats` 규격에 따라 DRM client usage stats를 구현합니다. 원문 SPDX 라이선스는 `GPL-2.0+`이고 reference anchor는 `panthor-usage-stats`입니다.

Panthor usage stats 경로
Panthor DRM client·VM·groupCSF engine accountingDriver-owned shmem BO accountingDRM fdinfo output

CSF execution과 내부 memory 사용량을 fdinfo에 집계합니다.

문서 연결
항목
Anchorpanthor-usage-stats
Specificationdrm-client-usage-stats
Engine keypanthor

Panthor 구현의 상위 규격과 engine 이름입니다.

.. SPDX-License-Identifier: GPL-2.0+

=========================
 drm/Panthor CSF driver
=========================

.. _panthor-usage-stats:

Panthor DRM client usage stats implementation
==============================================

The drm/Panthor driver implements the DRM client usage stats specification as
documented in :ref:`drm-client-usage-stats`.

Panthor fdinfo와 sampling bitmask

14-45

예제는 file metadata와 `drm-driver: panthor`, `drm-client-id` 뒤에 `drm-engine-panthor`, `drm-cycles-panthor`, `drm-maxfreq-panthor`, `drm-curfreq-panthor`를 출력합니다. 가능한 `drm-engine-` 이름은 `panthor` 하나이며 current frequency key는 현재 operating frequency를 나타냅니다.

일반 DRM memory key 외에 `panthor-resident-memory`와 `panthor-active-memory`도 출력됩니다.

전력 절감을 위해 engine·cycle sampling은 기본 비활성화입니다. `/sys/bus/platform/drivers/panthor/[a-f0-9]*.gpu/profiling`에 bit mask `N`을 씁니다. 첫 번째 bit는 cycle sampling, 두 번째 bit는 timestamp sampling을 각각 활성화합니다.

Panthor fdinfo key
분류Key
Enginedrm-engine-panthor
Cyclesdrm-cycles-panthor
Frequencydrm-maxfreq-panthor·drm-curfreq-panthor
Internal memorypanthor-resident-memory·panthor-active-memory
DRM memorytotal·shared·active·resident·purgeable

CSF engine과 memory accounting field입니다.

Panthor profiling bitmask
Bit 0: cycle samplingBit 1: timestamp sampling선택한 bit mask N 계산echo N > /sys/bus/platform/drivers/panthor/[a-f0-9]*.gpu/profilingfdinfo engine·cycle key 확인

두 sampling 기능을 bit별로 제어합니다.


Example of the output showing the implemented key value pairs and entirety of
the currently possible format options:

::
     pos:    0
     flags:  02400002
     mnt_id: 29
     ino:    491
     drm-driver:     panthor
     drm-client-id:  10
     drm-engine-panthor:     111110952750 ns
     drm-cycles-panthor:     94439687187
     drm-maxfreq-panthor:    1000000000 Hz
     drm-curfreq-panthor:    1000000000 Hz
     panthor-resident-memory:        10396 KiB
     panthor-active-memory:  10396 KiB
     drm-total-memory:       16480 KiB
     drm-shared-memory:      0
     drm-active-memory:      16200 KiB
     drm-resident-memory:    16480 KiB
     drm-purgeable-memory:   0

Possible `drm-engine-` key names are: `panthor`.
`drm-curfreq-` values convey the current operating frequency for that engine.

Users must bear in mind that engine and cycle sampling are disabled by default,
because of power saving concerns. `fdinfo` users and benchmark applications which
query the fdinfo file must make sure to toggle the job profiling status of the
driver by writing into the appropriate sysfs node::

    echo <N> > /sys/bus/platform/drivers/panthor/[a-f0-9]*.gpu/profiling

Driver-owned shmem BO accounting

46-56

가능한 `panthor-*-memory` key는 `active`와 `resident`입니다. 이 값은 DRM handle로 userspace에 노출되지 않는 driver-owned shmem BO의 크기를 나타냅니다. 예로 queue ring buffer, sync object array, heap chunk가 있습니다.

이 BO들은 creation 시 모두 allocate되고 pin되므로 전체 크기를 알리는 데는 `panthor-resident-memory`만으로 충분합니다.

`panthor-active-memory`는 현재 GPU execution scheduling 대상인 VM과 group에 연결된 kernel BO의 크기를 보여 줍니다.

Panthor internal memory
Key의미
panthor-resident-memory생성 시 allocate·pin된 모든 internal shmem BO
panthor-active-memory현재 scheduled VM·group과 연결된 kernel BO

Userspace handle이 없는 kernel BO accounting입니다.

Internal BO lifecycle
Queue ring·sync array·heap chunk 생성BO allocate 및 pinresident-memory에 포함VM·group이 GPU scheduling 대상이면 active-memory에도 포함

Creation과 scheduling 상태가 두 key에 반영됩니다.


Where `N` is a bit mask where cycle and timestamp sampling are respectively
enabled by the first and second bits.

Possible `panthor-*-memory` keys are: `active` and `resident`.
These values convey the sizes of the internal driver-owned shmem BO's that
aren't exposed to user-space through a DRM handle, like queue ring buffers,
sync object arrays and heap chunks. Because they are all allocated and pinned
at creation time, only `panthor-resident-memory` is necessary to tell us their
size. `panthor-active-memory` shows the size of kernel BO's associated with
VM's and groups currently being scheduled for execution by the GPU.