From: YM Yen <yminyen@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Walking User mode pages
Date: Thu, 28 Feb 2008 08:41:44 -0600 [thread overview]
Message-ID: <47C6C828.5040601@gmail.com> (raw)
hi,
I am a newbie to Linux kernel, so please forgive me if the question is
stupid.
To understand the swapping system, I decided to write a module to scan
every task_struct using for_each_process() checking whether or not the
page pointed by the pte is swapped out. To get the linear address
address of the pte, I did something similar to "pgd_offset <<
PGDIR_SHIFT + pud_offset << PUD_SHIFT + pmd_offset << PMDSHIFT +
pte_offset << PAGE_SHIFT". The offset for each level is simply the
iteration of the walking of the table ranging from 0 to PTRS_PER_(PGD,
PUD, PMD, PTE) depending on the table. However, the result of the
calculation doesn't match anything in the /proc/<pid>/maps.
Is this to be expected? If that's the case, how can I find out what's in
the swap file. Thanks in advance.
YM
reply other threads:[~2008-02-28 14:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=47C6C828.5040601@gmail.com \
--to=yminyen@gmail.com \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.