mm: dirty page problem

From: xue yong
Date: Tue Jun 23 2009 - 04:17:30 EST


I wrote a test program. It mmap a file and do some write, so some
pages become dirty.
and then I do "cat /proc/meminfo", so I get dirty pages that I have
written. this happened in my home
computer with debian, self compiled kernel 2.6.18-5 installed.


but in my company, on the servers (suse kernel 2.6.16.54), after the
test program have written the data, there was no change in
dirty pages column of "cat /proc/meminfo" 's output. after I killed
the test program, the dirty pages changed immediately.


I dont know why such different behavior, can you help me?


becauce we want a program mmap some files, and after the files'
contents were changed, the OS can write out these dirty
data back to disk periodly.




Best regards!

Attachment: mmaptest.c
Description: Binary data