Commit 9328b8fa authored by Nick Piggin's avatar Nick Piggin Committed by Linus Torvalds

[PATCH] mm: dma32 zone statistics

Add dma32 to zone statistics.  Also attempt to arrange struct page_state a
bit better (visually).
Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7756b9e4
...@@ -397,6 +397,7 @@ static inline int is_normal_idx(int idx) ...@@ -397,6 +397,7 @@ static inline int is_normal_idx(int idx)
{ {
return (idx == ZONE_NORMAL); return (idx == ZONE_NORMAL);
} }
/** /**
* is_highmem - helper function to quickly check if a struct zone is a * is_highmem - helper function to quickly check if a struct zone is a
* highmem zone or not. This is an attempt to keep references * highmem zone or not. This is an attempt to keep references
...@@ -413,6 +414,16 @@ static inline int is_normal(struct zone *zone) ...@@ -413,6 +414,16 @@ static inline int is_normal(struct zone *zone)
return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL; return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL;
} }
static inline int is_dma32(struct zone *zone)
{
return zone == zone->zone_pgdat->node_zones + ZONE_DMA32;
}
static inline int is_dma(struct zone *zone)
{
return zone == zone->zone_pgdat->node_zones + ZONE_DMA;
}
/* These two functions are used to setup the per zone pages min values */ /* These two functions are used to setup the per zone pages min values */
struct ctl_table; struct ctl_table;
struct file; struct file;
......
...@@ -97,32 +97,40 @@ struct page_state { ...@@ -97,32 +97,40 @@ struct page_state {
unsigned long pgpgout; /* Disk writes */ unsigned long pgpgout; /* Disk writes */
unsigned long pswpin; /* swap reads */ unsigned long pswpin; /* swap reads */
unsigned long pswpout; /* swap writes */ unsigned long pswpout; /* swap writes */
unsigned long pgalloc_high; /* page allocations */
unsigned long pgalloc_high; /* page allocations */
unsigned long pgalloc_normal; unsigned long pgalloc_normal;
unsigned long pgalloc_dma32;
unsigned long pgalloc_dma; unsigned long pgalloc_dma;
unsigned long pgfree; /* page freeings */ unsigned long pgfree; /* page freeings */
unsigned long pgactivate; /* pages moved inactive->active */ unsigned long pgactivate; /* pages moved inactive->active */
unsigned long pgdeactivate; /* pages moved active->inactive */ unsigned long pgdeactivate; /* pages moved active->inactive */
unsigned long pgfault; /* faults (major+minor) */ unsigned long pgfault; /* faults (major+minor) */
unsigned long pgmajfault; /* faults (major only) */ unsigned long pgmajfault; /* faults (major only) */
unsigned long pgrefill_high; /* inspected in refill_inactive_zone */ unsigned long pgrefill_high; /* inspected in refill_inactive_zone */
unsigned long pgrefill_normal; unsigned long pgrefill_normal;
unsigned long pgrefill_dma32;
unsigned long pgrefill_dma; unsigned long pgrefill_dma;
unsigned long pgsteal_high; /* total highmem pages reclaimed */ unsigned long pgsteal_high; /* total highmem pages reclaimed */
unsigned long pgsteal_normal; unsigned long pgsteal_normal;
unsigned long pgsteal_dma32;
unsigned long pgsteal_dma; unsigned long pgsteal_dma;
unsigned long pgscan_kswapd_high;/* total highmem pages scanned */ unsigned long pgscan_kswapd_high;/* total highmem pages scanned */
unsigned long pgscan_kswapd_normal; unsigned long pgscan_kswapd_normal;
unsigned long pgscan_kswapd_dma32;
unsigned long pgscan_kswapd_dma; unsigned long pgscan_kswapd_dma;
unsigned long pgscan_direct_high;/* total highmem pages scanned */ unsigned long pgscan_direct_high;/* total highmem pages scanned */
unsigned long pgscan_direct_normal; unsigned long pgscan_direct_normal;
unsigned long pgscan_direct_dma32;
unsigned long pgscan_direct_dma; unsigned long pgscan_direct_dma;
unsigned long pginodesteal; /* pages reclaimed via inode freeing */
unsigned long pginodesteal; /* pages reclaimed via inode freeing */
unsigned long slabs_scanned; /* slab objects scanned */ unsigned long slabs_scanned; /* slab objects scanned */
unsigned long kswapd_steal; /* pages reclaimed by kswapd */ unsigned long kswapd_steal; /* pages reclaimed by kswapd */
unsigned long kswapd_inodesteal;/* reclaimed via kswapd inode freeing */ unsigned long kswapd_inodesteal;/* reclaimed via kswapd inode freeing */
...@@ -157,6 +165,8 @@ extern void __mod_page_state(unsigned long offset, unsigned long delta); ...@@ -157,6 +165,8 @@ extern void __mod_page_state(unsigned long offset, unsigned long delta);
offset = offsetof(struct page_state, member##_high); \ offset = offsetof(struct page_state, member##_high); \
else if (is_normal(zone)) \ else if (is_normal(zone)) \
offset = offsetof(struct page_state, member##_normal); \ offset = offsetof(struct page_state, member##_normal); \
else if (is_dma32(zone)) \
offset = offsetof(struct page_state, member##_dma32); \
else \ else \
offset = offsetof(struct page_state, member##_dma); \ offset = offsetof(struct page_state, member##_dma); \
__mod_page_state(offset, (delta)); \ __mod_page_state(offset, (delta)); \
......
...@@ -2277,32 +2277,40 @@ static char *vmstat_text[] = { ...@@ -2277,32 +2277,40 @@ static char *vmstat_text[] = {
"pgpgout", "pgpgout",
"pswpin", "pswpin",
"pswpout", "pswpout",
"pgalloc_high",
"pgalloc_high",
"pgalloc_normal", "pgalloc_normal",
"pgalloc_dma32",
"pgalloc_dma", "pgalloc_dma",
"pgfree", "pgfree",
"pgactivate", "pgactivate",
"pgdeactivate", "pgdeactivate",
"pgfault", "pgfault",
"pgmajfault", "pgmajfault",
"pgrefill_high", "pgrefill_high",
"pgrefill_normal", "pgrefill_normal",
"pgrefill_dma32",
"pgrefill_dma", "pgrefill_dma",
"pgsteal_high", "pgsteal_high",
"pgsteal_normal", "pgsteal_normal",
"pgsteal_dma32",
"pgsteal_dma", "pgsteal_dma",
"pgscan_kswapd_high", "pgscan_kswapd_high",
"pgscan_kswapd_normal", "pgscan_kswapd_normal",
"pgscan_kswapd_dma32",
"pgscan_kswapd_dma", "pgscan_kswapd_dma",
"pgscan_direct_high", "pgscan_direct_high",
"pgscan_direct_normal", "pgscan_direct_normal",
"pgscan_direct_dma32",
"pgscan_direct_dma", "pgscan_direct_dma",
"pginodesteal",
"pginodesteal",
"slabs_scanned", "slabs_scanned",
"kswapd_steal", "kswapd_steal",
"kswapd_inodesteal", "kswapd_inodesteal",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment