Differentiating clean and dirty buffer cache pages

From: Anupama Chandwani
Date: Wed Aug 26 2009 - 17:22:31 EST


I need to get stats about what pages in the buffer cache are clean versus dirty.
I traverse the page_tree pointer of the radix tree of each open file
to get all buffer cache pages.

To identify dirty pages, I think of doing the following:
Level 1. Do a gang lookup in radix tree for PAGECACHE_TAG_DIRTY tag,
Level 2. Check the PTE of buffer cache pages for bit 6(D)

I want to know if checking these two data structures will give me a
complete list of all the dirty pages in the buffer cache?

Anupama Chandwani
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/