Linux内核中内存管理相关配置项的详细解析3

接前一篇文章:Linux内核中内存管理相关配置项的详细解析2

5. 2:1 compression allocator (zbud)

对应配置变量为:CONFIG_ZBUD。

此项默认为选中(如果前一项“Default allocator”中选择的是其它项,则此项为三态,默认不选中)。

内核源码详细解释为:

A special purpose allocator for storing compressed pages.

It is designed to store up to two compressed pages per physical

page. While this design limits storage density, it has simple and

deterministic reclaim properties that make it preferable to a higher

density approach when reclaim will be used.

一个(种)用于存储压缩页面的专用分配器。其被设计为每个物理页面最多存储两个压缩页面。虽然这种设计限制了存储密度,但它具有简单和确定的回收特性,因此在使用回收时,它比更高密度的方法更可取。

6. 3:1 compression allocator (z3fold)

对应配置变量为:CONFIG_Z3FOLD。

此项为三态,默认为不选中(如果前一项“Default allocator”中选择的是此项,则此项为默认选中)。

内核源码详细解释为:

A special purpose allocator for storing compressed pages.

It is designed to store up to three compressed pages per physical

page. It is a ZBUD derivative so the simplicity and determinism are

still there.

一个(种)用于存储压缩页面的专用分配器。其被设计为每个物理页面最多存储三个压缩页面。它是ZBUD的衍生物,所以简单性和确定性仍然存在。

7. N:1 compression allocator (zsmalloc)

对应配置变量为:CONFIG_ZSMALLOC。

此项为三态,默认为选中(如果前一项“Default allocator”中选择的是此项,则此项为默认选中)。

内核源码详细解释为:

zsmalloc is a slab-based memory allocator designed to store

pages of various compression levels efficiently. It achieves

the highest storage density with the least amount of fragmentation.

zsmalloc是一个基于slab的内存分配器,旨在有效地存储各种压缩级别的页面。

8. Export zsmalloc statistics(导出zsmalloc统计信息)

对应配置变量为:CONFIG_ZSMALLOC_STAT。

此项只有选中和不选中两种状态,默认为不选中。只有当上一项“N:1 compression allocator (zsmalloc)”选中时,此选项才会出现。

内核源码详细解释为:

This option enables code in the zsmalloc to collect various

statistics about what's happening in zsmalloc and exports that

information to userspace via debugfs.

If unsure, say N.

此选项使zsmalloc中的代码能够收集关于zsmalloc中发生的事情的各种统计信息,并通过debugfs将这些信息导出到用户空间。

如果不确定,选择N。

其它选项将在后续文章中继续介绍。

猜你喜欢

转载自blog.csdn.net/phmatthaus/article/details/131127334
今日推荐