티스토리 뷰

node_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를 배치할 수 있습니다.

댓글