struct page *mem_map is a global variable. It stores all page descriptors(struct *page) of the whole physical memory.
If the architecture is not NUMA, mem_map only store all page descriptors of NODE 0.
All information of each physical page frame is recorded in struct page.
In struct page, there is a member named flags, which can represent variety of status of each physical page frame. For example, PG_locked, PG_error, PG_referenced, PG_dirty, PG_lru, .etc.
Linux 2.6 divide each node into three memory zone:
0~16M, ZONE_DMA
16M~896M, ZONE_NORMAL
896m~ , ZONE_HIGHMEM
Usually, map physical memory 0~896M to line address 3G~3G+896M, kernel can directly access 0~896M physical memory, however, ZONE_HIGHMEM zone cannot be accessed directly by kernel, although physical frame in ZONE_HIGHMEM are also mapped to line address 3G+896M~4G.
阅读(915) | 评论(0) | 转发(0) |