How to calculate page address to PFN in user space.

Pankaj Suryawanshi suryawanshipankaj at yahoo.com
Sat Apr 6 02:15:41 EDT 2019





On Saturday, 6 April 2019 2:57 AM, Valdis Klētnieks <valdis.kletnieks at vt.edu> wrote:



On Fri, 05 Apr 2019 10:54:47 -0000, Pankaj Suryawanshi said:


> I have PFN of all processes in user space, how to calculate page address to PFN.

*All* user processes?  That's going to be a lot of PFN's.  What problem are you trying

to solve here?

I am trying to solve problem with cma allocation failure, and try to find process who pinned the pages from cma reserved area.

When cma allocation failed it dumped the information and it contains flags and page address, before failing i have information/PFN of processes who aquires pages from cma area. 
Now i want to find exact PFN of the dumped pages who is responsible for allocation failure.

Note: I have got the pfn from /tools/vm/page-types.c in user space and i have start pfn of cma reserved area, so i filter the cma area pfn.
(Hint - under what cases does the kernel care about the PFN of *any* user page?)



More information about the Kernelnewbies mailing list