given a vma, how can I walk all the pages?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.  I'm trying to get the page structs for all the pages in a vma.  in
2.4.18 it looks like mm_follow_page (from memory.c) would do it?  Like,
I could do:

for (vma = t->mm->mmap; vma; vma = vma->vm_next) {
		/* loop thru all the pages in this vma */
		addr = vma->vm_start;
		while (addr < vma->vm_end ) { 
			apage = mm_follow_page(t->mm, addr, 0);
			addr += PAGE_SIZE;
			
		}
}

but the machine hangs when I do this.
any help is appreciated.


-- 
Anthony
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux