接前一篇文章:Linux内核中内存管理相关配置项的详细解析9
十六、Contiguous Memory Allocator
对应配置变量为:CONFIG_CMA。
此项只有选中和不选中两种状态,默认为不选中。
此项的内核源码详细解释为:
This enables the Contiguous Memory Allocator which allows other
subsystems to allocate big physically-contiguous blocks of memory.
CMA reserves a region of memory and allows only movable pages to
be allocated from it. This way, the kernel can use the memory for
pagecache and when a subsystem requests for contiguous area, the
allocated pages are migrated away to serve the contiguous request.
此项启用了连续内存分配器,该分配器允许其它子系统分配大的物理连续内存块。CMA保留一个内存区域,并且只允许从中分配可移动页面。通过这种方式,内核可以将内存用于页面缓存,并且当子系统请求连续区域时,所分配的页面被迁移出去以服务于该连续请求。
十七、CMA debug messages (DEVELOPMENT)
对应配置变量为:CONFIG_CMA_DEBUG。
此项只有选中和不选中两种状态,默认为不选中。只有当上一项“Contiguous Memory Allocator”被选中时,此项才会出现。
此项的内核源码详细解释为:
Turns on debug messages in CMA. This produces KERN_DEBUG
messages for every CMA call as well as various messages while
processing calls such as dma_alloc_from_contiguous().
This option does not affect warning and error messages.
打开CMA中的调试消息。这会为每个CMA调用生成KERN_DEBUG消息以及各种消息,当处理诸如dma_alloc_from_continguous()的调用时。此选项不影响警告和错误消息。
十八、CMA debugfs interface
对应配置变量为:CONFIG_CMA_DEBUGFS。
此项只有选中和不选中两种状态,默认为不选中。只有“Contiguous Memory Allocator”被选中时,此项才会出现。
此项的内核源码详细解释为:
Turns on the DebugFS interface for CMA.
打开CMA的DebugFS接口。
十九、CMA information through sysfs interface
对应配置变量为:CONFIG_CMA_SYSFS。
此项只有选中和不选中两种状态,默认为不选中。只有“Contiguous Memory Allocator”被选中时,此项才会出现。
此项的内核源码详细解释为:
This option exposes some sysfs attributes to get information from CMA.
此选项公开一些sysfs属性以从CMA获取信息。
二十、Maximum count of the CMA areas
对应配置变量为:CONFIG_CMA_AREAS。
此项为数值项而非选择项,默认值为19。
此项的内核源码详细解释为:
CMA allows to create CMA areas for particular purpose, mainly,
used as device private area. This parameter sets the maximum
number of CMA area in the system.
If unsure, leave the default value "7" in UMA and "19" in NUMA.
CMA允许为特殊目的创建CMA区域,主要用作设备专用区域。此参数设置系统中CMA区域的最大数量。
如果不确定,在UMA中默认值为“7”,在NUMA中为“19”。