The remap_file_pages() system call is used to create a nonlinear mapping,
that is, a mapping in which the pages of the file are mapped into a
nonsequential order in memory. The advantage of using remap_file_pages()
over using repeated calls to mmap(2) is that the former approach does not
require the kernel to create additional VMA (Virtual Memory Area) data
structures.
Supporting of nonlinear mapping requires significant amount of non-trivial
code in kernel virtual memory subsystem including hot paths. Also to get
nonlinear mapping work kernel need a way to distinguish normal page table
entries from entries with file offset (pte_file). Kernel reserves flag in
PTE for this purpose. PTE flags are scarce resource especially on some CPU
architectures. It would be nice to free up the flag for other usage.
Fortunately, there are not many users of remap_file_pages() in the wild.
It's only known that one enterprise RDBMS implementation uses the syscall
on 32-bit systems to map files bigger than can linearly fit into 32-bit
virtual address space. This use-case is not critical anymore since 64-bit
systems are widely available.
The plan is to deprecate the syscall and replace it with an emulation.
The emulation will create new VMAs instead of nonlinear mappings. It's
going to work slower for rare users of remap_file_pages() but ABI is
preserved.
One side effect of emulation (apart from performance) is that user can hit
vm.max_map_count limit more easily due to additional VMAs. See comment for
DEFAULT_MAX_MAP_COUNT for more details on the limit.
JonSco
- 粉丝: 95
- 资源: 1万+
最新资源
- 不同国家的基尼系数(税后)数据集,基尼系数是国际上用来综合考察居民内部收入分配差异状况的一个重要分析指标
- 基于Python+Django+Mysql的校园二手交易跳蚤市场设计源码+数据库(高分毕设)
- 世界前2000公司数据集,2024年全球前2000大公司的财务信息
- 计组存储器习题 1.docx
- 计组 7.2 指令系统.docx
- 计组 5.5 浮点加减运算 7.1 指令系统.docx
- 计组 5.2 浮点数据表示.docx
- 计组复习 4.docx
- 计组复习 3.docx
- 威纶通触摸屏如何避免打开项目时提示找不到图库的问题.docx
- 浏览器与性能优化个人笔记
- 计组期末复习 2.docx
- 综合教程PPT.zip
- 计组 5.3 补码的加减法.docx
- 计组复习期末 1.docx
- 计组 10.1 微操作的节拍安排.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈