Roland Dreier wrote:
>  > Maybe we should use the /proc/pid/pagemap and /proc/kpageflags files?
>  > These files let a userspace process find out which physical frame
>  > each virtual page is mapped to and to get the properties of each page
>  > frame including the page size.
> 
> Sounds interesting... the only problem is that /proc/kpageflags is
> root-only, so we can't use that.  But does /proc/pid/pagemap give enough
> information to be useful?

The most useful information that /proc/pid/pagemap provides the PFN (if the
page is not swapped out). In fact there is very useful tool called 
Documentation/vm/page-types.c which gives a lot of the information that we 
need. Again the caveat is that it uses /proc/kpageflags.

/proc/pid/pagemap also provided "page shift". I am not sure what that is
in the context of huge pages.
> 
>  > The disadvantage of this method is, that it applicable on kernel >=
>  > 2.6.25, since this interface is supported starting from the kernel
>  > 2.6.25.
> 
> I think that's OK

Pradeep

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to