Paging - can i know the last owner(pid) of a given page?

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Fri Jan 9 05:03:42 EST 2015


On Thu, 08 Jan 2015 18:09:19 +0900, manty kuma said:

> Suppose, I have a kernel virtual address. Can I know which is the process
> that last used this address?

In general, no.

First off, there's no good definition of "used" - if an address is pointing
to (for instance) the inode for /dev/null, what does "used" mean?  And
more importantly, there's no hardware support for telling what kernel routines
accessed a given address (unless you want to use kgdb-ish techniques for
trapping on memory access - which gets *painful* if you have more than a
few dozen points of interest).

Second, it's quite possible that the most recent access was from a non-process
context like a hardIRQ or something.

What problem are you trying to solve here?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150109/595dcd19/attachment.bin 


More information about the Kernelnewbies mailing list