Kernel Newbies archive on lore.kernel.org
 help / color / 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, back to index

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

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org kernelnewbies@archiver.kernel.org
	public-inbox-index kernelnewbies


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/ public-inbox