Implications
- Memory allocations in the kernel area always land in physical RAM
- Simple mapping:
- 1단계 page table 1024개에서 1/4는 커널 거다
Fixed Kernel Space address mapping
In practice, kernel physically pin kernel address space in hardware, preventing paging out. by using hardware global bit (G): prevent TLB flushing (apply only to PTE). That is the basic reason why the ratio is 1:3.
The physical memory is directly mapped into the kernel address space, which is maximum 1G (with PAGE_OFFSET=3G)
Pages inside dynamic memory area can be owned by user or kernel
high_memory
, low_memory
standard divide pinned addressThe kernel uses the two frequently employed abbreviations “lowmem” and “highmem” (beyond 896M) to distinguish between physical frames that can be mapped directly to kernel address space, and those that cannot.
- lowmem: physical memory for which logical addresses exist in kernel space
- highmem: physical memory for which logical addresses do not exist.
1024 - 128 = 896 for magic space
- The vmalloc area - biggest
- noncontiguous frame mapping
- allocate continuous kernel virtual address with non-contiguous physical addresses
- High memory mappings (persistent mappings)
- used to map pages from the highmem area into the kerne
- Fixmaps (temporary mappings)