LKML Archive on
help / color / mirror / Atom feed
* Walking User mode pages
@ 2008-02-28 14:41 YM Yen
  0 siblings, 0 replies; only message in thread
From: YM Yen @ 2008-02-28 14:41 UTC (permalink / raw)
  To: linux-kernel


I am a newbie to Linux kernel, so please forgive me if the question is

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-28 14:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-28 14:41 Walking User mode pages YM Yen

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).