内核虚拟地址中的高内存映射 space

High memory mappings in kernel virtual address space

超出896MB的线性地址对应High内存区域ZONE_HIGHMEM。 所以页面分配器函数不会在这个区域工作,因为它们给出了 ZONE_NORMAL 和 ZONE_DMA.

中直接映射的页框的线性地址

我对 Undertanding linux 内核中指定的这些行感到困惑:

  1. 他们说"In 64 bit hardware platforms ZONE_HIGHMEM is always empty."

  2. 是什么意思
  3. 这条突出显示的语句是什么意思:"The allocation of high-memory page frames is done only through alloc_pages() function. These functions do not return linear address since they do not exist. Instead the functions return linear address of the page descriptor of the first allocated page frame. These linear addresses always exist, because all page descriptors are allocated in low memory once and forever during kernel initialization."

这些页面描述符是什么?896MB是否已经拥有整个RAM的所有页面描述符。

  1. x86-32内核需要高端内存才能访问超过1G的物理内存,因为不可能在32位地址内永久映射超过2^{32}个地址space 和 kernel/user 拆分为 1G/3G。 x86-64 内核没有这样的限制,因为物理可寻址内存的数量(当前为 256T)适合其 64 位地址 space,因此可以始终被永久映射。 高内存是一个黑客。理想情况下你不需要它。实际上,x86-64 的重点是能够直接寻址您可能需要的所有内存。采取 来自 https://www.quora.com/Linux-Kernel/What-is-the-difference-between-high-memory-and-normal-memory

  2. 我认为页面描述符的意思是struct page。并考虑 sizeof struct page。是的,所有这些都可以存储在 ZONE_NORMAL