Reputation: 11
I tried using madvise(MADV_DONTNEED)
and verified with /proc/pid/pagemap
that pages are unmapped correctly. Although none of the functions in the page is accessed, some of the pages are mapped back pretty soon. From what I read, there are two lists - Active and Inactive. madvise(MADV_DONTNEED)
will result in the pages removed from both the lists. If this is correct, is there anything other than a CPU access to an address in the page that can cause the page to be loaded back? References to the code will be really helpful. My goal is to keep the page evicted and not loaded back.
Upvotes: 1
Views: 164