ZONE_NORMAL 与内核/用户页面关联

发布于 2024-10-09 19:20:43 字数 503 浏览 5 评论 0原文

alt text

上面介绍的是我只有 512 MB 物理内存的情况。到目前为止我读到的是 ZONE_NORMAL 映射到内核虚拟地址空间,如图所示。本质上,我有 512 MB 物理内存,其中 496 MB 的 ZONE_NORMAL 映射到内核虚拟空间。基于这种理解,我的问题如下:

  • ZONE_NORMAL 是否仅由内核空间页面组成?
  • 如果 ZONE_NORMAL 仅由内核页面组成,并且完全映射到内核空间虚拟地址范围,那么用户空间页面位于哪里?物理内存中似乎没有任何空间用于用户空间页面。

我完全混淆了物理内存小于 4GB 的情况,如我提出的这种情况所示。我在这里“错过”了 ZONE_HIGHMEM 吗?它是如何确定的,有多少物理内存进入 ZONE_NORMAL ,有多少进入 ZONE_HIGHMEM ?

如果有人能阐明这一点,我将非常感激。

alt text

Above is presented a case where I have only 512 MB of physical memory. What I have read up so far, is that ZONE_NORMAL is mapped to the kernel virtual address space as shown. Essentially I have a 512 MB physical memory, out of which 496 MB worth of ZONE_NORMAL is mapped to the kernel virtual space. Based on this understanding, following are my question:

  • Does, ZONE_NORMAL consists of only kernel space pages ?
  • If ZONE_NORMAL consists only of kernel pages and is mapped completely to the kernel space virtual address range, where do the user space pages get located ?? There does not seem to be any room for user space pages in physical memory.

I am totally mixed up of the case where the physical memory is less than 4GB as shown in this case that I have put forth. Have I "missed" out on the ZONE_HIGHMEM here ? How does it get determined, how much of the physical memory goes to ZONE_NORMAL and how much goes to ZONE_HIGHMEM ?

Would really appreciate if someone can throw light on this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

丑疤怪 2024-10-16 19:20:43

ZONE_NORMAL 是否仅由内核空间页面组成?

=== 不。

ZONE_NORMAL表示线性映射到物理内存。虚拟地址与对应的物理地址之间的偏移量是一个常数值(通常为0xc000,0000)。例如,如果虚拟地址为0xc123,0000,则其物理地址为0x0123,0000。

ZONE_NORMAL 中的页面可以由内核或用户级进程使用,只要它们彼此不冲突。

ZONE_HIGHMEM仅在物理内存大于896MB时存在。

Does, ZONE_NORMAL consists of only kernel space pages ?

=== NO.

ZONE_NORMAL means it is linearly mapped into the physical memory. The offset between the virtual address and the corresponding physical address is a constant value (normally, it is 0xc000,0000). For example, if the virtual address is 0xc123,0000, then its physical address is 0x0123,0000.

Pages in ZONE_NORMAL can be used either by the kernel or the user level processes, as long as they are not conflict with each other.

ZONE_HIGHMEM only exist when the physical memory is larger than 896MB.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文