Dirty pages counting



Hello:

Just a simple curiosity question to the people:

I'm writing a very simple kernel module (for 2.6) which will walk
through the page table structure of a process and count all the dirty
pages there (http://fxr.watson.org/fxr/ident?
v=linux-2.4.22;i=PageDirty). This number used to be available in the
stat file, but it is set to 0 in 2.6 kernel. The hardware this stuff
is running on doesn't have any backing store, so all the used pages
just sit in RAM until the process exits.

The effect that I'm observing is that for some processes this module
just returns zero as the dirty page count, but returns a normal number
for others. The result is very consistent for every measurement (it is
not timing dependent). If this hardware had the backing store, then
perhaps it could be possible, but this is a cell phone with FLASH and
no backing is allowed.

Does anyone have any ideas why this effect may occur? A process should
have at least one dirty page for the stack segment.

Thank you,
-Ilya.

.