Linux Kernel
3.7.1
|
munlock_vma_page - munlock a vma page
called from munlock()/munmap() path with page supposedly on the LRU. When we munlock a page, because the vma where we found the page is being munlock()ed or munmap()ed, we want to check whether other vmas hold the page locked so that we can leave it on the unevictable lru list and not bother vmscan with it. However, to walk the page's rmap list in try_to_munlock() we must isolate the page from the LRU. If some other task has removed the page from the LRU, we won't be able to do that. So we clear the PageMlocked as we might not get another chance. If we can't isolate the page, we leave it for putback_lru_page() and vmscan [page_referenced()/try_to_unmap()] to deal with.