From: iomartin@iomartin.net (Martin Ichilevici de Oliveira)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Understanding page statistics
Date: Wed, 13 Aug 2014 18:31:58 -0300 [thread overview]
Message-ID: <20140813213157.GA13456@gamayun> (raw)
Hello,
I'm starting to study and learn the kernel, and I'm particulary
interested in the virtual memory mechanism and it's application in NUMA
architectures.
As far as I could understand, the kernel keeps track of some
information/statistics about each page, and I'd like to read them with a
kernel module - just to see what kind of information is available
(something more detailed than /proc/<pid>/maps).
In a LWN article [1], I read the following:
"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. The scheduler will trap that fault and
restore access to the page in question; it will also increment an access
counter in a per-process array indexed by the NUMA node number."
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.
Thank you,
Martin
[1] : http://lwn.net/Articles/568870/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140813/eb62c3ac/attachment.bin
next reply other threads:[~2014-08-13 21:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-13 21:31 Martin Ichilevici de Oliveira [this message]
2014-08-14 11:39 ` Understanding page statistics Steffen Vogel
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=20140813213157.GA13456@gamayun \
--to=iomartin@iomartin.net \
--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).