From: post@steffenvogel.de (Steffen Vogel)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Understanding page statistics
Date: Thu, 14 Aug 2014 13:39:32 +0200 [thread overview]
Message-ID: <1408016372.1714.12.camel@len.0l.de> (raw)
In-Reply-To: <20140813213157.GA13456@gamayun>
Am Mittwoch, den 13.08.2014, 18:31 -0300 schrieb Martin Ichilevici de
Oliveira:
> "The scheduler will periodically scan through each process's address
> space, revoking all access permissions to the pages that are currently
> resident in RAM. The next time the affected process tries to access that
> memory, a page fault will result.
I don't know how often the flags are reset.
But isn't this a huge overhead? I don't see any advantages for this on
UMA machines.
> I've built a simple kernel module that, given a PID and virtual address,
> retrieves the corresponding struct page. I'm now unsure now where to look
> for such statistics and counters. Any hints on relevant data structures are
> appreciated.
Oh okay, If I'm correct 'struct page' represents a physical page frame
rather than virtual mapped page (see [2]).
The first thing which comes in my mind is LRU aka the kernels page frame
reclamation which is used for swapping unused pages to disk.
I'm mot really sure wheather the LRU lists are based on physical pages.
But I assume so.
You might want to have a look at /proc/pid/pagemap for detailed
information of the VA per process [1].
Theres also a /proc/kpageflags and /proc/kpagecount which contain
information over physical pages [1].
Steffen
[1] https://www.kernel.org/doc/Documentation/vm/pagemap.txt
[2] http://www.tldp.org/LDP/tlk/ds/ds.html
[3] http://linux-mm.org/LRU
[4] https://www.kernel.org/doc/gorman/html/understand/understand013.html
--
Steffen Vogel
Robensstra?e 69
52070 Aachen
Mail: post at steffenvogel.de
Mobil: +49 1575 7180927
Web: http://www.steffenvogel.de
Jabber: steffen.vogel at jabber.rwth-aachen.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140814/1d065013/attachment-0001.bin
prev parent reply other threads:[~2014-08-14 11:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-13 21:31 Understanding page statistics Martin Ichilevici de Oliveira
2014-08-14 11:39 ` Steffen Vogel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408016372.1714.12.camel@len.0l.de \
--to=post@steffenvogel.de \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).