1. I don’t have swap partition 2. My application use lots of memory, and use mlockall to locked lots of physical page. I guess when the free pages get really low, kernel doesn’t have other option, as lots of pages are locked(mallocall) and dirty. The only option is to drop some read only data, as I cat /proc/$PID/smaps, I found Some .so file. Rss is much. smaller than the actual size, and sometimes my application got unexpected ReadIO and latency. I guess that's because the code segment dropped, then it needed to be read back. 7f9bf0faa000-7f9bf11a9000 ---p 00037000 103:01 51781261 /usr/lib/x86_64-linux-gnu/libxxx.so 23784 Size: 2044 kB 23785 KernelPageSize: 4 kB 23786 MMUPageSize: 4 kB 23787 Rss: 0 kB 23788 Pss: 0 kB My question is: which code will drop the readonly page? For dirty page I can find it in mm/vmscan.c shrink_page_list -> pageout https://elixir.bootlin.com/linux/latest/source/mm/vmscan.c#L1553 As pageout function call guards by if (PageDirty(page)) { … pageout(page, mapping); } Can anyone tell me where the code is located to drop the read only pages? Such as the elf/.so code segment. Thanks. Regards Yunhua