Index: linux-2.6.18-rc4-mm3/mm/vmstat.c =================================================================== --- linux-2.6.18-rc4-mm3.orig/mm/vmstat.c 2006-08-26 16:38:04.916130114 -0700 +++ linux-2.6.18-rc4-mm3/mm/vmstat.c 2006-08-28 11:56:29.187174156 -0700 @@ -461,6 +461,7 @@ static char *vmstat_text[] = { "nr_slab_unreclaimable", "nr_page_table_pages", "nr_dirty", + "nr_unmapped_clean", "nr_writeback", "nr_unstable", "nr_bounce", Index: linux-2.6.18-rc4-mm3/fs/proc/proc_misc.c =================================================================== --- linux-2.6.18-rc4-mm3.orig/fs/proc/proc_misc.c 2006-08-27 22:31:45.030193628 -0700 +++ linux-2.6.18-rc4-mm3/fs/proc/proc_misc.c 2006-08-28 11:58:47.246010020 -0700 @@ -170,6 +170,7 @@ static int meminfo_read_proc(char *page, "Writeback: %8lu kB\n" "AnonPages: %8lu kB\n" "Mapped: %8lu kB\n" + "CleanUnmapd: %8lu kB\n" "Slab: %8lu kB\n" "SReclaimable: %8lu kB\n" "SUnreclaim: %8lu kB\n" @@ -200,6 +201,7 @@ static int meminfo_read_proc(char *page, K(global_page_state(NR_WRITEBACK)), K(global_page_state(NR_ANON_PAGES)), K(global_page_state(NR_FILE_MAPPED)), + K(global_page_state(NR_CLEAN_UNMAPPED)), K(global_page_state(NR_SLAB_RECLAIMABLE) + global_page_state(NR_SLAB_UNRECLAIMABLE)), K(global_page_state(NR_SLAB_RECLAIMABLE)), Index: linux-2.6.18-rc4-mm3/include/linux/mmzone.h =================================================================== --- linux-2.6.18-rc4-mm3.orig/include/linux/mmzone.h 2006-08-26 16:38:04.251132153 -0700 +++ linux-2.6.18-rc4-mm3/include/linux/mmzone.h 2006-08-28 11:56:29.190103662 -0700 @@ -55,6 +55,7 @@ enum zone_stat_item { NR_SLAB_UNRECLAIMABLE, NR_PAGETABLE, /* used for pagetables */ NR_FILE_DIRTY, + NR_CLEAN_UNMAPPED, NR_WRITEBACK, NR_UNSTABLE_NFS, /* NFS unstable pages */ NR_BOUNCE, Index: linux-2.6.18-rc4-mm3/fs/buffer.c =================================================================== --- linux-2.6.18-rc4-mm3.orig/fs/buffer.c 2006-08-26 16:38:01.980764665 -0700 +++ linux-2.6.18-rc4-mm3/fs/buffer.c 2006-08-28 12:04:52.108190199 -0700 @@ -867,6 +867,10 @@ int __set_page_dirty_buffers(struct page if (page->mapping) { /* Race with truncate? */ if (mapping_cap_account_dirty(mapping)) __inc_zone_page_state(page, NR_FILE_DIRTY); + /* + * Unmapped pages are never dirtied and thus + * we do not check if we need to decrease NR_CLEAN_UNMAPPED + */ radix_tree_tag_set(&mapping->page_tree, page_index(page), PAGECACHE_TAG_DIRTY); Index: linux-2.6.18-rc4-mm3/fs/nfs/write.c =================================================================== --- linux-2.6.18-rc4-mm3.orig/fs/nfs/write.c 2006-08-26 16:38:02.776613913 -0700 +++ linux-2.6.18-rc4-mm3/fs/nfs/write.c 2006-08-28 12:02:31.129611860 -0700 @@ -504,7 +504,11 @@ nfs_mark_request_dirty(struct nfs_page * nfs_list_add_request(req, &nfsi->dirty); nfsi->ndirty++; spin_unlock(&nfsi->req_lock); - inc_zone_page_state(req->wb_page, NR_FILE_DIRTY); + inc_zone_page_dirty(req->wb_page, NR_FILE_DIRTy); + /* + * Unmapped pages cannot be dirtied and therefore we skip checking if + * we need to decrease NR_CLEAN_UNMAPPED + */ mark_inode_dirty(inode); } Index: linux-2.6.18-rc4-mm3/fs/nfs/pagelist.c =================================================================== --- linux-2.6.18-rc4-mm3.orig/fs/nfs/pagelist.c 2006-08-26 16:38:02.766848892 -0700 +++ linux-2.6.18-rc4-mm3/fs/nfs/pagelist.c 2006-08-28 12:03:44.194425139 -0700 @@ -315,7 +315,12 @@ nfs_scan_lock_dirty(struct nfs_inode *nf req->wb_index, NFS_PAGE_TAG_DIRTY); nfs_list_remove_request(req); nfs_list_add_request(req, dst); - dec_zone_page_state(req->wb_page, NR_FILE_DIRTY); + dec_zone_page_dirty(req->wb_page, NR_FILE_DIRTY); + /* + * Unmapped pages cannot be dirtied and + * we can therefore avoid checking if we + * need to decrease NR_CLEAN_UNMAPPED + */ res++; } } Index: linux-2.6.18-rc4-mm3/drivers/base/node.c =================================================================== --- linux-2.6.18-rc4-mm3.orig/drivers/base/node.c 2006-08-26 16:37:58.941889989 -0700 +++ linux-2.6.18-rc4-mm3/drivers/base/node.c 2006-08-28 11:58:05.961456435 -0700 @@ -64,6 +64,7 @@ static ssize_t node_read_meminfo(struct "Node %d Writeback: %8lu kB\n" "Node %d FilePages: %8lu kB\n" "Node %d Mapped: %8lu kB\n" + "Node %d CleanUnmapd: %8lu kB\n" "Node %d AnonPages: %8lu kB\n" "Node %d PageTables: %8lu kB\n" "Node %d NFS_Unstable: %8lu kB\n" @@ -86,6 +87,7 @@ static ssize_t node_read_meminfo(struct nid, K(node_page_state(nid, NR_WRITEBACK)), nid, K(node_page_state(nid, NR_FILE_PAGES)), nid, K(node_page_state(nid, NR_FILE_MAPPED)), + nid, K(node_page_state(nid, NR_CLEAN_UNMAPPED)), nid, K(node_page_state(nid, NR_ANON_PAGES)), nid, K(node_page_state(nid, NR_PAGETABLE)), nid, K(node_page_state(nid, NR_UNSTABLE_NFS)),