diff options
author | Christoph Lameter <clameter@sgi.com> | 2007-02-10 01:43:02 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 10:51:17 -0800 |
commit | 51ed4491271be8c56bdb2a03481ed34ea4984bc2 (patch) | |
tree | 580e03859b7c78a05a6ed479957cd3a1d846c5da | |
parent | d23ad42324cc4378132e51f2fc5c9ba6cbe75182 (diff) |
[PATCH] Reorder ZVCs according to cacheline
The global and per zone counter sums are in arrays of longs. Reorder the ZVCs
so that the most frequently used ZVCs are put into the same cacheline. That
way calculations of the global, node and per zone vm state touches only a
single cacheline. This is mostly important for 64 bit systems were one 128
byte cacheline takes only 8 longs.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/mmzone.h | 8 | ||||
-rw-r--r-- | mm/vmstat.c | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 824279c7884d..d15b1f68aef9 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -47,6 +47,7 @@ struct zone_padding { #endif enum zone_stat_item { + /* First 128 byte cacheline (assuming 64 bit words) */ NR_FREE_PAGES, NR_INACTIVE, NR_ACTIVE, @@ -54,11 +55,12 @@ enum zone_stat_item { NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. only modified from process context */ NR_FILE_PAGES, - NR_SLAB_RECLAIMABLE, - NR_SLAB_UNRECLAIMABLE, - NR_PAGETABLE, /* used for pagetables */ NR_FILE_DIRTY, NR_WRITEBACK, + /* Second 128 byte cacheline */ + NR_SLAB_RECLAIMABLE, + NR_SLAB_UNRECLAIMABLE, + NR_PAGETABLE, /* used for pagetables */ NR_UNSTABLE_NFS, /* NFS unstable pages */ NR_BOUNCE, NR_VMSCAN_WRITE, diff --git a/mm/vmstat.c b/mm/vmstat.c index 2386716f1754..2ee7ec5e003f 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -447,11 +447,11 @@ static const char * const vmstat_text[] = { "nr_anon_pages", "nr_mapped", "nr_file_pages", + "nr_dirty", + "nr_writeback", "nr_slab_reclaimable", "nr_slab_unreclaimable", "nr_page_table_pages", - "nr_dirty", - "nr_writeback", "nr_unstable", "nr_bounce", "nr_vmscan_write", |