In the Linux kernel, given the task_struct
's mm
I can access the process's list of vm_area_struct
s. Given these vm_area_struct
s, how do I get the struct page
s which actually correspond to this vma?
I tried looking for functions in mm/memory.c and the like, but I was at a loss.
Edit: the idea is to find which pages in the vma are currently in memory and which are not. But I don't want someone telling me how to do this bit, as that's a small part of a homework assignment that I need to figure out on my own. But I can't seem to figure out how to find the pages that correspond to this vma. If I can find the pages, I figure I can check to see if they have a valid pfn or not.