vmalloc使用的地址范围
2011-06-17 15:53
417 查看
Vmalloc可以获得的地址在VMALLOC_START到VMALLOC_END的范围中。这两个符号在<asm/pgtable.h>中定义:
* arch/arm/include/asm/pgtable.h
/*
* Just any arbitrary offset to the start of the vmalloc VM area: the
* current 8MB value just means that there will be a 8MB "hole" after the
* physical memory until the kernel virtual memory starts. That means that
* any out-of-bounds memory accesses will hopefully be caught.
* The vmalloc() routines leaves a hole of 4kB between each vmalloced
* area for the same reason. ;)
*
* Note that platforms may override VMALLOC_START, but they must provide
* VMALLOC_END. VMALLOC_END defines the (exclusive) limit of this space,
* which may not overlap IO space.
*/
#ifndef VMALLOC_START
#define VMALLOC_OFFSET (8*1024*1024)
#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
#endif
high_memory值在这里定义:
/* arch/arm/mm/init.c */
void __init bootmem_init(struct meminfo *mi)
{
……
high_memory = __va((max_low << PAGE_SHIFT) - 1) + 1;
}
在我们的板子上,这些值为:
lzm: bootmem_init : high_memory = E0000000 <--------- 3G+512M , high_memory既实际内存最大物理地址对应的的内核逻辑地址
加8MB
lzm: bootmem_init : VMALLOC_START = E0800000 <--------- 3G+512M+8M (8M为内核规定的一个gap) ,vmalloc分配的起始地址(内核空间)
用vmalloc=0k 启动后
Using UBoot passing parameters structure
vmalloc area too small, limiting to 16MB 默认128m,现在变成16m,少了112m
Memory policy: ECC disabled, Data cache writeback
Truncating RAM at 20000000-3fffffff to -26ffffff (vmalloc region overlap). 提高到624m
lzm: bootmem_init : high_memory = E7000000 <--------- 3G+512M +112M,升高了112m
lzm: bootmem_init : VMALLOC_START = E7800000
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 158496
Kernel command line: root=/dev/nfs nfsroot=192.168.73.60:/rootfs rw noinitrd init=/sbin/init ip=192.168.73.59:192.168.73.1:192.168.73.1:255.255.255.0:target:eth0:off console=ttyS0,115200 console=tty1 mtdparts=spi_flash:0x100000?(uboot),0x700000?x100000(linux-root) mac=00:11:65:34:43:22 video=dovefb:lcd0:1024x768-32?0 clcd.lcd0_enable=1 vmalloc=0k
PID hash table entries: 4096 (order: 12, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 512MB 112MB = 624MB total
Memory: 620032KB available (5244K code, 300K data, 4172K init, 0K highmem)
Hierarchical RCU implementation.
。。。
但是出现了错误:
vmap allocation for size 16781312 failed: use vmalloc=<size> to increase size.
ERROR: Failed to ioremap Flash device at physical base 0xf4000000
参考链接:
http://www.cublog.cn/u2/60011/showart_1019016.html
* arch/arm/include/asm/pgtable.h
/*
* Just any arbitrary offset to the start of the vmalloc VM area: the
* current 8MB value just means that there will be a 8MB "hole" after the
* physical memory until the kernel virtual memory starts. That means that
* any out-of-bounds memory accesses will hopefully be caught.
* The vmalloc() routines leaves a hole of 4kB between each vmalloced
* area for the same reason. ;)
*
* Note that platforms may override VMALLOC_START, but they must provide
* VMALLOC_END. VMALLOC_END defines the (exclusive) limit of this space,
* which may not overlap IO space.
*/
#ifndef VMALLOC_START
#define VMALLOC_OFFSET (8*1024*1024)
#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
#endif
high_memory值在这里定义:
/* arch/arm/mm/init.c */
void __init bootmem_init(struct meminfo *mi)
{
……
high_memory = __va((max_low << PAGE_SHIFT) - 1) + 1;
}
在我们的板子上,这些值为:
lzm: bootmem_init : high_memory = E0000000 <--------- 3G+512M , high_memory既实际内存最大物理地址对应的的内核逻辑地址
加8MB
lzm: bootmem_init : VMALLOC_START = E0800000 <--------- 3G+512M+8M (8M为内核规定的一个gap) ,vmalloc分配的起始地址(内核空间)
用vmalloc=0k 启动后
Using UBoot passing parameters structure
vmalloc area too small, limiting to 16MB 默认128m,现在变成16m,少了112m
Memory policy: ECC disabled, Data cache writeback
Truncating RAM at 20000000-3fffffff to -26ffffff (vmalloc region overlap). 提高到624m
lzm: bootmem_init : high_memory = E7000000 <--------- 3G+512M +112M,升高了112m
lzm: bootmem_init : VMALLOC_START = E7800000
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 158496
Kernel command line: root=/dev/nfs nfsroot=192.168.73.60:/rootfs rw noinitrd init=/sbin/init ip=192.168.73.59:192.168.73.1:192.168.73.1:255.255.255.0:target:eth0:off console=ttyS0,115200 console=tty1 mtdparts=spi_flash:0x100000?(uboot),0x700000?x100000(linux-root) mac=00:11:65:34:43:22 video=dovefb:lcd0:1024x768-32?0 clcd.lcd0_enable=1 vmalloc=0k
PID hash table entries: 4096 (order: 12, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 512MB 112MB = 624MB total
Memory: 620032KB available (5244K code, 300K data, 4172K init, 0K highmem)
Hierarchical RCU implementation.
。。。
但是出现了错误:
vmap allocation for size 16781312 failed: use vmalloc=<size> to increase size.
ERROR: Failed to ioremap Flash device at physical base 0xf4000000
参考链接:
http://www.cublog.cn/u2/60011/showart_1019016.html
相关文章推荐
- vmalloc使用的地址范围
- Linux开发心得总结13 - Linux内存管理和分析vmalloc使用的地址范围
- Linux内存管理和分析vmalloc使用的地址范围
- Linux内存管理和分析vmalloc使用的地址范围
- Linux内存管理和分析vmalloc使用的地址范围
- jquery下载地址:https://code.jquery.com/jquery/ 影响范围: 版本低于1.7的jQuery过滤用户输入数据所使用的正则表达式存在缺陷,可能导致LOCA
- LeetCode/reverse(地址A,地址B)的使用和表示的反转范围
- 使用ISA2006发布安全的Sharepoint站点疑难问题解答之连接地址转换
- TD8.0的安装使用及下载地址连接
- 项目搭建系列之四:SpringMVC框架下使用UrlRewrite实现地址重写
- 对于超前,滞后,超前滞后使用范围
- easy_install 和pip安装软件时使用指定的 源地址
- android游戏开发框架libgdx的使用-安卓巴士教程地址汇总
- socket编程:地址已经被使用——Address already in use
- PHP使用Curl请求Https地址时需要注意
- MVC验证12-使用DataAnnotationsExtensions对整型、邮件、最小值、文件类型、Url地址等验证
- KindEditor 4.1.11最新版 网站实例 包含使用方法 下载地址
- vfio 通过VFIO_IOMMU_MAP_DMA 得到iommu映射后的地址。这样就等于user space直接使用iommu接口
- tomcat 服务器使用 url rewrite (地址转向)
- 使用 Visual Basic 通过 32 位 地址访问内存(中英对照)