Yes, you are paying the price for that extra check. It s not just for pointer indirection, but any memory access (other than, say, DMA). However, the cost of the check is very small.
While your process is running, the page table does not change very often. Parts of the page table will be cached in the translation lookaside buffer, accessing pages with entries in the buffer incur no additional penalty.
如果您的工作能够进入一个没有TLB进入的网页,那么,CPU必须增加记忆,使该页页的页表进入。 之后,将安排时间。
你们可以通过起草试验方案来看待这一效果。 • 抽取你的试样方案,并随机抽取和书写记忆。 利用指挥线参数改变规模。
- Above the L1 cache size, performance will drop due to L2 cache latency.
- Above the L2 cache size, performance will drop to RAM latency.
- Above the size of the memory addressed by the TLB, performance will drop due to TLB misses. (This might happen before or after you run out of L2 cache space, depending on a number of factors.)
- Above the size of available RAM, performance will drop due to swapping.
- Above the size of available swap space and RAM, the application will be terminated by the OS.
如果您的运行系统允许“大页”,TLB可能实际上能够覆盖一个非常大的地址空间。 也许你可以通过从<条码>mmap中分配4k chunks来破坏本组织,在这种情况下,根据你的处理者,TLB misses可能只感受几个工作套。
<>光> 必须根据虚拟记忆的惠益来权衡业绩下降幅度较小的情况,而虚拟记忆的惠益太大,无法在此列出。