页表可以分页吗? [英] Can the page table be paged out?

查看:99
本文介绍了页表可以分页吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据我的理解,它不应该存在,因为它位于内核空间中,并且内核空间不可分页.但是使用64位地址空间时,我看不到它怎么能容纳整个页表,因为它太大了.关于如何实现的任何想法?

According to my understanding it shouldn't be, since it's in kernel space and kernel space is non pageable. But with 64 bit address space I don't see how it can hold the full page table since it would be prohibitively large. Any ideas on how this achieved?

我还猜想,即使将其完全保存在磁盘上也要占用大量空间.由于大多数虚拟机空间都没有使用,是否有办法将页表限制为仅包含已使用的虚拟机地址范围?

Also I guess even holding it on disk fully would take a lot of space. Since most of the VM space would be unused is there way to limit the page table to contain only used VM address ranges?

推荐答案

页表实际上是一棵树:它由多个子表组成.头(根)表存储指向子表的指针,子表也可以存储指向其子表的指针,依此类推(当然,链中的最后一个表存储实际的页表条目).由于未使用64位地址空间中的最大内存,因此没有必要为所有表实际分配​​内存.根表只是将其大多数指针设置为null.

The page table is actually a tree: it consists of multiple child tables. The head (root) table stores pointers to child tables, the child tables may also store the pointers to their child tables, and so on (the last table in chain stores the actual page table entry, of course). As the most memory in 64-bit address space is unused, it is not necessary to actually allocate memory for all the tables. The root table just sets most of its pointers to null.

在x86_64上,这种间接访问有4-5个级别.

On x86_64, there are 4-5 levels of such indirection.

这篇关于页表可以分页吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆