Linux中映射到磁盘文件的脏页如何刷新到文件中?
我正在尝试弄清楚 Linux IO 的内部结构。
在一个应用程序中,我将磁盘文件映射到用户空间虚拟地址,并将一些数据写入虚拟地址。我认为 Linux 中触发了页面错误来为映射的磁盘文件创建 PTE,并且 PTE 设置了“脏”位。过了一会儿,有些东西将脏页刷新到磁盘文件,从而通过 mmap 写入文件完成。
所以我的问题是 Linux 内核中的哪个组件检测到“脏”页面来执行页面刷新以及这种检测和刷新多久发生一次?
I am trying to figure out Linux IO internals.
In one application, I mmap a disk file to user space virtual address, the write some data to the virtual address. I think there triggered a page fault in Linux to create a PTE for the mapped disk file and the PTE has 'Dirty' bit set. After a while, something flushed the dirty page to disk file, thus writing to file through mmap is done.
So my question is what component in Linux kernel detects the 'Dirty' page to do the page flushing and how ofter does this detecting and flushing happen?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论