Getting dirtied pages info

Peter Teoh htmldeveloper at gmail.com
Mon Oct 3 00:05:09 EDT 2011


Basically the concept of 'dirty' is because the memory is file-backed,
ie, everytime you changed the memory, it has to be flushed to the
file.   In Xen the dirty bit is also used to signify the page being
modified by the guest, and therefore certain operation like sync-ing
between host and guest, or inter-guest sync-ing is possible.

It is just a bit defined in the 64-bit PTE (defined in
include/linux/page-flags.h), and to query it for each page in the
system is via /proc/kpageflags, internally how that is displayed is
implemented in fs/proc/page.c (kernel source).

There is also a tool to query kpageflags:

http://lwn.net/Articles/332300/


On Fri, Sep 30, 2011 at 12:16 AM, Prateek Sharma <prateek3.14 at gmail.com> wrote:
> Hi all,
>     What would be a good way to get a list of all pages(lets say
> pfns) dirtied in a particular time interval ?
> I am reading about MMU_notifiers but i think a simpler, light-weight
> solution might work.. I came across the page-dirtied bits...are those
> saved somewhere by the kernel on context-switches?
>     Thanks!
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
Regards,
Peter Teoh



More information about the Kernelnewbies mailing list