← Documents Documentation/ABI/testing/procfs-smaps_rollup GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

/proc/pid/smaps_rollup memory summary ABI

Process의 모든 VMA에 있는 smaps memory fields를 [rollup] entry 하나로 합산하고 Pss_Anon·Pss_File·Pss_Shmem breakdown을 추가하는 procfs ABI를 설명합니다.

Source pathDocumentation/ABI/testing/procfs-smaps_rollup
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

VMA field 합산과 PSS breakdown

procfs-smaps_rollup:1-15

smaps_rollup은 /proc/pid/smaps와 거의 같은 format이지만 VMA별 entry 대신 대응 field를 모두 더한 [rollup] entry 하나를 제공합니다. 세 Pss_* field는 anon·file·shmem type별 Pss 합입니다.

Typical rollup output

procfs-smaps_rollup:17-42

Sample은 virtual address span, aggregate size·RSS·PSS, sharing·dirty·hugetlb·swap·locked fields를 kB 단위로 보여 줍니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /proc/pid/smaps_rollup
2 Date: August 2017
3 Contact: Daniel Colascione <[email protected]>
4 Description:
5 This file provides pre-summed memory information for a
6 process. The format is almost identical to /proc/pid/smaps,
7 except instead of an entry for each VMA in a process,
8 smaps_rollup has a single entry (tagged "[rollup]")
9 for which each field is the sum of the corresponding
10 fields from all the maps in /proc/pid/smaps.
11 Additionally, the fields Pss_Anon, Pss_File and Pss_Shmem
12 are not present in /proc/pid/smaps. These fields represent
13 the sum of the Pss field of each type (anon, file, shmem).
14 For more details, see Documentation/filesystems/proc.rst
15 and the procfs man page.
16
17 Typical output looks like this::
18
19 00100000-ff709000 ---p 00000000 00:00 0 [rollup]
20 Size: 1192 kB
21 KernelPageSize: 4 kB
22 MMUPageSize: 4 kB
23 Rss: 884 kB
24 Pss: 385 kB
25 Pss_Dirty: 68 kB
26 Pss_Anon: 301 kB
27 Pss_File: 80 kB
28 Pss_Shmem: 4 kB
29 Shared_Clean: 696 kB
30 Shared_Dirty: 0 kB
31 Private_Clean: 120 kB
32 Private_Dirty: 68 kB
33 Referenced: 884 kB
34 Anonymous: 68 kB
35 LazyFree: 0 kB
36 AnonHugePages: 0 kB
37 ShmemPmdMapped: 0 kB
38 Shared_Hugetlb: 0 kB
39 Private_Hugetlb: 0 kB
40 Swap: 0 kB
41 SwapPss: 0 kB
42 Locked: 385 kB
43

3. 한국어 전문 번역

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

Process memory의 pre-summed view

1-15
항목내용
What/proc/pid/smaps_rollup
Date2017년 8월
ContactDaniel Colascione <[email protected]>
DescriptionProcess에 대해 미리 합산한 memory information을 제공합니다.

Format은 /proc/pid/smaps와 거의 동일합니다. 다만 process의 각 VMA마다 entry를 두는 대신 smaps_rollup에는 [rollup] tag가 붙은 entry 하나가 있고, 각 field는 /proc/pid/smaps의 모든 map에서 대응하는 field를 합한 값입니다.

또한 Pss_Anon, Pss_File, Pss_Shmem field는 /proc/pid/smaps에 없습니다. 이 field들은 각 type, 즉 anon·file·shmem별 Pss field의 합을 나타냅니다.

자세한 내용은 Documentation/filesystems/proc.rst와 procfs man page를 참조하십시오.

Typical smaps_rollup output

17-42
00100000-ff709000 ---p 00000000 00:00 0         [rollup]
Size:               1192 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Rss:                  884 kB
Pss:                  385 kB
Pss_Dirty:             68 kB
Pss_Anon:             301 kB
Pss_File:              80 kB
Pss_Shmem:              4 kB
Shared_Clean:         696 kB
Shared_Dirty:           0 kB
Private_Clean:        120 kB
Private_Dirty:         68 kB
Referenced:           884 kB
Anonymous:             68 kB
LazyFree:               0 kB
AnonHugePages:          0 kB
ShmemPmdMapped:         0 kB
Shared_Hugetlb:         0 kB
Private_Hugetlb:        0 kB
Swap:                    0 kB
SwapPss:                 0 kB
Locked:                385 kB
smaps에서 smaps_rollup으로의 집계
VMA 1 smaps fieldsSum corresponding fieldsSingle [rollup] entry
VMA 2 through VMA N smaps fieldsSum corresponding fieldsSingle [rollup] entry
Pss by mapping typeAnonymous Pss sumPss_Anon
Pss by mapping typeFile Pss sumPss_File
Pss by mapping typeShared-memory Pss sumPss_Shmem

Process의 각 VMA field를 같은 이름끼리 합산하고 PSS만 anonymous·file·shared-memory type별 subtotal을 더 제공한다.