Search code examples
memory-managementlinux-kernelkmallocvmalloc

Why physically contiguous memory region is more efficient than virtually contiguous memory.?


It is said that Physically contiguous memory region is more efficient than virtually contiguous memory, for that Robert Love's book says that kernel don't need to set up the page table entries for physically contiguous memory.

But doesn't kernel needs the page table in all scenario ? So which page table entries it needs to create in case of virtually contiguous memory.


Solution

  • For large blocks of physically contiguous memory, the kernel can use huge pages, i.e., much fewer page table entries.