diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-02-03 16:59:17 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-02-03 16:59:17 -0800 |
| commit | b29422e31ced8c0b37b23eff2eda8ec2cbfc3f3a (patch) | |
| tree | d186bba0c0d4195ba9f9da5980d9e12759d0fa90 /include | |
| parent | f5585f5df513f0ebdd2d6ad2ff884c9c765010af (diff) | |
[PATCH] add stats for page reclaim via inode freeing
pagecache can be reclaimed via the page LRU and via prune_icache. We
currently don't know how much reclaim is happening via each.
The patch adds instrumentation to display the number of pages which were
freed via prune_icache. This is displayed in /proc/vmstat:pginodesteal and
/proc/vmstat:kswapd_inodesteal.
Turns out that under some workloads (well, dbench at least), fully half of
page reclaim is via the unused inode list. Which seems quite OK to me.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/fs.h | 4 | ||||
| -rw-r--r-- | include/linux/page-flags.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index f4c994d02f5d..9a17c9819ae9 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1102,9 +1102,9 @@ extern int full_check_disk_change(struct block_device *); extern int __check_disk_change(dev_t); extern int invalidate_inodes(struct super_block *); extern int invalidate_device(kdev_t, int); -extern void invalidate_mapping_pages(struct address_space *mapping, +unsigned long invalidate_mapping_pages(struct address_space *mapping, pgoff_t start, pgoff_t end); -extern void invalidate_inode_pages(struct address_space *mapping); +unsigned long invalidate_inode_pages(struct address_space *mapping); extern void invalidate_inode_pages2(struct address_space *mapping); extern void write_inode_now(struct inode *, int); extern int filemap_fdatawrite(struct address_space *); diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index a50e09ff79ea..0327a8421c9d 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -97,15 +97,20 @@ struct page_state { unsigned long pswpin; /* swap reads */ unsigned long pswpout; /* swap writes */ unsigned long pgalloc; /* page allocations */ + unsigned long pgfree; /* page freeings */ unsigned long pgactivate; /* pages moved inactive->active */ unsigned long pgdeactivate; /* pages moved active->inactive */ unsigned long pgfault; /* faults (major+minor) */ unsigned long pgmajfault; /* faults (major only) */ + unsigned long pgscan; /* pages scanned by page reclaim */ unsigned long pgrefill; /* inspected in refill_inactive_zone */ unsigned long pgsteal; /* total pages reclaimed */ + unsigned long pginodesteal; /* pages reclaimed via inode freeing */ unsigned long kswapd_steal; /* pages reclaimed by kswapd */ + + unsigned long kswapd_inodesteal;/* reclaimed via kswapd inode freeing */ unsigned long pageoutrun; /* kswapd's calls to page reclaim */ unsigned long allocstall; /* direct reclaim calls */ unsigned long pgrotated; /* pages rotated to tail of the LRU */ |
