1

I have process i and I want to know if that process has physical pages in memory zone z.

I know how to do a page table walk if I have a given address; however, since those all require some sort of virtual address.

I know the beginning page of z from z -> zone_start_pfn and it's end from zone_end_pfn(z) and reading seems to indicate that reverse mapping isn't available.

So what is the easy way to determine if process i has PPNs in zone z?

I want to do this in kernel space if that makes things easier.

SailorCire
  • 548
  • 1
  • 7
  • 24
  • You could try to work with physical addresses though. There are macros: _ _pa( ) and _ _va( ) which convert virtual address of a process to its physical address and back. It might be first step to solve your problem. – Anton Glukhov May 12 '15 at 20:22

1 Answers1

1

You can do this very easily from user space using pagemap API.

moorray
  • 222
  • 2
  • 10