分割为2GB:2GB而不是1GB:3GB时的linux内存映射 [英] linux memory mapping when the split is 2GB:2GB instead of 1GB:3GB

查看:81
本文介绍了分割为2GB:2GB而不是1GB:3GB时的linux内存映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当内核拥有2GB内存时会发生什么?

What happens when kernel owns 2GB of memory?

  1. 从3GB虚拟地址空间开始,894MB的直接映射将保持不变.

  1. will the direct mapping of 894MB remains the same starting at 3GB of virtual address space.

将为vmalloc预留的临时映射将获得更多的128 MB虚拟内存,并再次获得低于3GB虚拟地址的新1GB. ?

will temporary mapping set aside for vmalloc gets more virtual memory that is 128 MB and again the new 1GB which is below the 3GB of the virtual address. ?

,适用于2GB内核空间.

is the below picture true for 2GB kernel space.

| ------------------ | 4GB

|------------------|4GB

| 128MB |

| 128MB |

vmalloc区域

| ------------------ |

|------------------|

| 896MB |

| 896MB |

| ---------------- | 3GB

|---------------- |3GB

| 1GB |

vmalloc区域

| ------------------- | 2GB

|-------------------|2GB

推荐答案

得到答案.

page_offset必须设置为0x80000000,而不是典型的默认值. 0xC0000000,这意味着所有高端内存区域都将映射到896MB内核内存之上.

The page_offset must be set to 0x80000000 instead of the typical default of 0xC0000000 ,which means all the high memory region will be mapped above the 896MB of kernel memory.

__ pa(x)和__va(x)使用此PAGE_OFFSET进行地址转换.

This PAGE_OFFSET is used by __pa(x) and __va(x) for address conversion.

这篇关于分割为2GB:2GB而不是1GB:3GB时的linux内存映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆