how linux do page reclaim of anonymous mmap region?

24 Views Asked by At

If I use anonymous mmap with NORESERVE flag, and then I manage page table of this region manually(by pass original linux kernel implementation). For example, if I install a physic page for a virtual address in this region, will it be reclaimed by linux kernel when memory pressure is high? What's the eviction policy is linux kernel of anonymous mmap region? where can I find the codes?

1

There are 1 best solutions below

0
Caleb Rubalema On

The Linux kernel's eviction policy for anonymous mmap regions varies depending on memory pressure and system configurations. It uses techniques like swapping, paging, and memory reclamation.

If managing the page table manually, the kernel may not be aware of pages allocated within the region, potentially bypassing its eviction considerations.

To find relevant code, explore the kernel source in directories like mm/ and include/linux/. Websites like GitHub mirror the source for easy navigation.

Directly manipulating kernel memory management can impact system stability and performance, so proceed with caution.