Search code examples
linuxmemory-managementlinux-kernelmemory-addressdynamic-memory-allocation

Is it faster when access the contiguous physical address than virtual address?


What's the benifit of allocating a chunk of contiguous physical memory?

Is it faster when access the contiguous physical address than virtual address? And why?


Solution

  • All memory accesses from the CPU go through the MMU; the speed does not depend on the actual location of the pages in physical memory.

    Physically contiguous memory is needed for other devices that access memory but are not able to remap pages. In that case, the contiguous allocation is needed to make the device work to begin with, and is not a question of speed.