问题
I want to be able to remove a page from page cache so that next access to this page (by any process) will trigger a page fault. I'm doing this from the kernel, and I have a pointer to struct page
I wish to remove.
Deleting from page cache is easy (done by __delete_from_page_cache()
), but I don't know how to "unmap" this page from all processes mapping it into their VMAs. I tried using try_to_unmap(my_page, cpu_page, TTU_UNMAP|TTU_IGNORE_MLOCK|TTU_IGNORE_ACCESS)
from rmap.c
but it doesn't seem to do what I want it to.
Any help is highly appreciated.
Thank you!
来源:https://stackoverflow.com/questions/49887237/how-to-unmap-struct-page-from-all-ptes-mapping-it