aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2007-02-10 04:43:02 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:17 -0500
commit51ed4491271be8c56bdb2a03481ed34ea4984bc2 (patch)
tree580e03859b7c78a05a6ed479957cd3a1d846c5da
parentd23ad42324cc4378132e51f2fc5c9ba6cbe75182 (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.h8
-rw-r--r--mm/vmstat.c4
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 {
47#endif 47#endif
48 48
49enum zone_stat_item { 49enum zone_stat_item {
50 /* First 128 byte cacheline (assuming 64 bit words) */
50 NR_FREE_PAGES, 51 NR_FREE_PAGES,
51 NR_INACTIVE, 52 NR_INACTIVE,
52 NR_ACTIVE, 53 NR_ACTIVE,
@@ -54,11 +55,12 @@ enum zone_stat_item {
54 NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. 55 NR_FILE_MAPPED, /* pagecache pages mapped into pagetables.
55 only modified from process context */ 56 only modified from process context */
56 NR_FILE_PAGES, 57 NR_FILE_PAGES,
57 NR_SLAB_RECLAIMABLE,
58 NR_SLAB_UNRECLAIMABLE,
59 NR_PAGETABLE, /* used for pagetables */
60 NR_FILE_DIRTY, 58 NR_FILE_DIRTY,
61 NR_WRITEBACK, 59 NR_WRITEBACK,
60 /* Second 128 byte cacheline */
61 NR_SLAB_RECLAIMABLE,
62 NR_SLAB_UNRECLAIMABLE,
63 NR_PAGETABLE, /* used for pagetables */
62 NR_UNSTABLE_NFS, /* NFS unstable pages */ 64 NR_UNSTABLE_NFS, /* NFS unstable pages */
63 NR_BOUNCE, 65 NR_BOUNCE,
64 NR_VMSCAN_WRITE, 66 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[] = {
447 "nr_anon_pages", 447 "nr_anon_pages",
448 "nr_mapped", 448 "nr_mapped",
449 "nr_file_pages", 449 "nr_file_pages",
450 "nr_dirty",
451 "nr_writeback",
450 "nr_slab_reclaimable", 452 "nr_slab_reclaimable",
451 "nr_slab_unreclaimable", 453 "nr_slab_unreclaimable",
452 "nr_page_table_pages", 454 "nr_page_table_pages",
453 "nr_dirty",
454 "nr_writeback",
455 "nr_unstable", 455 "nr_unstable",
456 "nr_bounce", 456 "nr_bounce",
457 "nr_vmscan_write", 457 "nr_vmscan_write",