kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* How to calculate page address to PFN in user space.
       [not found] <1536252828.16026118.1554461687939.ref@mail.yahoo.com>
@ 2019-04-05 10:54 ` Pankaj Suryawanshi
  2019-04-05 21:27   ` Valdis Klētnieks
  0 siblings, 1 reply; 3+ messages in thread
From: Pankaj Suryawanshi @ 2019-04-05 10:54 UTC (permalink / raw)
  To: LKML, linux-mm, kernelnewbies

Hello,

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

eg .

page address :bf05febc in kernel space.


I have PFN no for user space processes as below.

8a81b
69da0
88cf4
88d06
88d07
9549f
952d0
9734a
87c7d
87ca0

How to calculate/match page address to PFN ?

Regards,
Pankaj

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to calculate page address to PFN in user space.
  2019-04-05 10:54 ` How to calculate page address to PFN in user space Pankaj Suryawanshi
@ 2019-04-05 21:27   ` Valdis Klētnieks
  2019-04-06  6:15     ` Pankaj Suryawanshi
  0 siblings, 1 reply; 3+ messages in thread
From: Valdis Klētnieks @ 2019-04-05 21:27 UTC (permalink / raw)
  To: Pankaj Suryawanshi; +Cc: linux-mm, LKML, kernelnewbies

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?

(Hint - under what cases does the kernel care about the PFN of *any* user page?)

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to calculate page address to PFN in user space.
  2019-04-05 21:27   ` Valdis Klētnieks
@ 2019-04-06  6:15     ` Pankaj Suryawanshi
  0 siblings, 0 replies; 3+ messages in thread
From: Pankaj Suryawanshi @ 2019-04-06  6:15 UTC (permalink / raw)
  To: Valdis Klētnieks; +Cc: linux-mm, LKML, kernelnewbies





On Saturday, 6 April 2019 2:57 AM, Valdis Klētnieks <valdis.kletnieks@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?)

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-06  6:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1536252828.16026118.1554461687939.ref@mail.yahoo.com>
2019-04-05 10:54 ` How to calculate page address to PFN in user space Pankaj Suryawanshi
2019-04-05 21:27   ` Valdis Klētnieks
2019-04-06  6:15     ` Pankaj Suryawanshi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).