AI大模型教程
一起来学习

An end to high memory?

This patch from Johannes Weiner seemed like a straightforward way to improve memory-reclaim performance; without it, the virtual filesystem layer throws away memory that the memory-management subsystem thinks is still worth keeping. But that patch quickly ran afoul of a feature (or “misfeature” depending on who one asks) from the distant past, one which goes by the name of “high memory”. Now, more than 20 years after its addition, high memory may be brought down low, as developers consider whether it should be deprecated and eventually removed from the kernel altogether.

Johannes Weiner 的这个补丁看起来是一个直接提升内存回收性能的方法;没有它的话,虚拟文件系统层会丢弃内存管理子系统认为仍值得保留的内存。但该补丁很快遇到了一个来自久远年代的功能(或“反模式”,取决于你问谁),它的名字叫做“高端内存”。如今,在它被引入 20 多年后,高端内存可能要被“放下身段”,因为开发者正在考虑是否应当弃用它,并最终将其彻底从内核中移除。


A high-memory refresher
The younger readers out there may be forgiven for not remembering just what high memory is, so a quick refresh seems in order. We’ll start by noting, for the oldest among our readers, that it has nothing to do with the “high memory” concept found on early personal computers. That, of course, was memory above the hardware-implemented hole at 640KB — memory that was, according to a famous quote often attributed to Bill Gates, surplus to the requirements of any reasonable user. The kernel’s notion of high memory, instead, is a software construct, not directly driven by the hardware.

高端内存回顾
年轻的读者可能不太清楚高端内存到底是什么,因此有必要快速回顾一下。首先要说明的是,对于年长一些的读者来说,它与早期个人电脑上的“高端内存”概念没有关系。那时的高端内存是指 640KB 硬件空洞之上的内存——按照一句常被归因于比尔·盖茨的名言,那是“对任何理性用户来说都多余的内存”。而内核中的高端内存则完全不同,它是一个软件构造,而不是由硬件直接决定的。


Since the earliest days, the kernel has maintained a “direct map”, wherein all of physical memory is mapped into a single, large, linear array in kernel space. The direct map makes it easy for the kernel to manipulate any page in the system; it also, on somewhat newer hardware, is relatively efficient since it is mapped using huge pages.

从最早期开始,内核就维护着一张“直接映射表”,其中整个物理内存被映射到内核空间中的一个大线性数组里。直接映射使得内核可以方便地操作系统中的任意页面;并且在较新的硬件上,这种方式效率也相对较高,因为它是通过大页映射实现的。


A problem arose, though, as memory sizes increased. A 32-bit system has the ability to address 4GB of virtual memory; while user space and the kernel could have distinct 4GB address spaces, arranging things that way imposes a significant performance cost resulting from the need for frequent translation lookaside buffer flushes. To avoid paying this cost, Linux

文章来源于互联网:An end to high memory?

相关推荐: 高效回复微信消息,告别手忙脚乱!自动回复别错过!

还在为每天海量的微信消息焦头烂额? 客户咨询应接不暇,好友请求堆积如山? 手动回复耗时耗力,还会遗漏个别消息? 试试个微管理系统的机器人功能,让你彻底解放双手,回复效率提升300%! 1、 好友请求,自动秒过 再也不用守着手机点”通过”!系统实时监控,新好友请…

赞(0)
未经允许不得转载:5bei.cn大模型教程网 » An end to high memory?
分享到: 更多 (0)

AI大模型,我们的未来

小欢软考联系我们