티스토리 뷰
개발/코드로 알아보는 ARM 리눅스 커널 TIL
20240921 4.3.3 vmemmap 을 사용하는 sparse 메모리 모델 (p277)
clucle 2024. 11. 16. 15:30node_spanned_pages -> 노드 전체 페이지 수
node_present_pages -> 노드에 실제 페이지수
zone_spanned_pages_in_node -> 노드의 존에 전체 페이지수
zone_absent_pages_in_node -> 노드의 홀(빈) 페이지
리눅스의 워터마크 = 어떤 제한값 정도인가?
migratetype 존 안의 페이지를 타입별로 관리
mmzone.h
enum {
MIGRATE_UNMOVABLE,
MIGRATE_MOVABLE,
MIGRATE_RECLAIMABLE,
MIGRATE_PCPTYPES, /* the number of types on the pcp lists */
MIGRATE_HIGHATOMIC = MIGRATE_PCPTYPES,
#ifdef CONFIG_CMA
/*
* MIGRATE_CMA migration type is designed to mimic the way
* ZONE_MOVABLE works. Only movable pages can be allocated
* from MIGRATE_CMA pageblocks and page allocator never
* implicitly change migration type of MIGRATE_CMA pageblock.
*
* The way to use it is to change migratetype of a range of
* pageblocks to MIGRATE_CMA which can be done by
* __free_pageblock_cma() function. What is important though
* is that a range of pageblocks must be aligned to
* MAX_ORDER_NR_PAGES should biggest page be bigger then
* a single pageblock.
*/
MIGRATE_CMA,
#endif
#ifdef CONFIG_MEMORY_ISOLATION
MIGRATE_ISOLATE, /* can't allocate from here */
#endif
MIGRATE_TYPES
};
$ sudo cat /proc/pagetypeinfo
Page block order: 9
Pages per block: 512
Free pages count per migrate type at order 0 1 2 3 4 5 6 7 8 9 10
Node 0, zone DMA32, type Unmovable 0 0 0 0 0 0 0 0 1 0 0
Node 0, zone DMA32, type Movable 2 1 1 0 1 2 2 2 2 3 972
Node 0, zone DMA32, type Reclaimable 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone DMA32, type HighAtomic 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone DMA32, type Isolate 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone Normal, type Unmovable 1 0 1 4 1 9 8 14 7 0 0
Node 0, zone Normal, type Movable 1 0 1 1 1 3 7 10 4 5 876
Node 0, zone Normal, type Reclaimable 0 41 54 80 35 29 7 4 1 0 0
Node 0, zone Normal, type HighAtomic 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone Normal, type Isolate 0 0 0 0 0 0 0 0 0 0 0
Number of blocks type Unmovable Movable Reclaimable HighAtomic Isolate
Node 0, zone DMA32 2 1982 0 0 0
Node 0, zone Normal 225 1855 13 0 0
altmap의 역할
대체 메모리 맵(Alternative Memory Map):
altmap은 메모리 페이지를 관리할 때, 페이지 구조체(struct page)를 위한 대체 메모리 할당 전략을 제공합니다.
기본적으로 커널은 페이지 구조체를 관리할 때, 해당 페이지 자체가 차지하는 메모리 공간을 관리하는데, altmap을 사용하면 다른 메모리 영역에 struct page를 배치할 수 있습니다.
'개발 > 코드로 알아보는 ARM 리눅스 커널 TIL' 카테고리의 다른 글
20241005 4.4.3 버디 시스템의 페이지 할당 (p322) (0) | 2024.11.20 |
---|---|
20240928 4.4 버디 시스템 (p309) (0) | 2024.11.16 |
20240907 4.2.2 메모리 맵 (p249) & 4.3 존 (p.254) (0) | 2024.11.16 |
20240831 - sparse init (p269) (0) | 2024.11.16 |
20240817 페이징과 매핑 (p200) & memblock(p221) (0) | 2024.11.16 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- mysql
- chrome-extension
- shared_from_this
- set value
- 코어 남기기
- Obstacle Avoidance
- it's called a vrpit
- Golang
- 우리는 vr핏이라고 부릅니다
- SuffixArray
- 잘못된 빨간줄
- cockroach db
- ad skip
- 카카오
- Reciprocal n-body Collision Avoidance
- 클래스 맴버 변수 출력하기
- Quest2
- print shared_ptr class member variable
- 봄날에 스케치
- 영상 픽셀화 하기
- RVO
- vrpit
- 면접
- boost
- C++
- hole-punching
- 에러 위치 찾기
- red underline
- Visual Studio
- vr핏
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함