diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-10-02 22:58:11 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-02 22:58:11 -0700 |
| commit | 7e96bae145f0f6bf287e5ba11679c114ed76f5d7 (patch) | |
| tree | 3863fb93e4d147b546e68216b5e05129521abdce /include/linux | |
| parent | 15e19695f630adab6b1988d21a069cb0a0bfe677 (diff) | |
[PATCH] add kswapd success accounting to /proc/vmstat
Tells us how many pages were reclaimed by kswapd.
The `pgsteal' statistic tells us how many pages were reclaimed
altogether. So
kswapd_steal - pgsteal
is the number of pages which were directly reclaimed by page allocating
processes.
Also, the `pgscan' data is currently counting the number of pages
scanned in shrink_cache() plus the number of pages scanned in
refill_inactive_zone(). These are rather separate concepts, so I
created the new `pgrefill' counter for refill_inactive_zone().
`pgscan' is now just the number of pages scanned in shrink_cache().
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/page-flags.h | 2 | ||||
| -rw-r--r-- | include/linux/sched.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 62bb6403c160..5c770f49787a 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -98,7 +98,9 @@ extern struct page_state { unsigned long pgfault; unsigned long pgmajfault; unsigned long pgscan; + unsigned long pgrefill; unsigned long pgsteal; + unsigned long kswapd_steal; unsigned long pageoutrun; unsigned long allocstall; } ____cacheline_aligned_in_smp page_states[NR_CPUS]; diff --git a/include/linux/sched.h b/include/linux/sched.h index 8a361b76cf43..26b85f1661c4 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -433,6 +433,7 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0) #define PF_FROZEN 0x00040000 /* frozen for system suspend */ #define PF_SYNC 0x00080000 /* performing fsync(), etc */ #define PF_FSTRANS 0x00100000 /* inside a filesystem transaction */ +#define PF_KSWAPD 0x00200000 /* I am kswapd */ /* * Ptrace flags |
