diff options
author | Dimitri Sivanich <sivanich@sgi.com> | 2011-10-31 20:09:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-31 20:30:51 -0400 |
commit | a1cb2c60ddc98ff4e5246f410558805401ceee67 (patch) | |
tree | 49e3e620ff2974dc78fad8df0b343b07b75be407 /mm/vmstat.c | |
parent | 3d470fc385defa60d9af610f05db8e7f8b4f2f5e (diff) |
mm/vmstat.c: cache align vm_stat
Avoid false sharing of the vm_stat array.
This was found to adversely affect tmpfs I/O performance.
Tests run on a 640 cpu UV system.
With 120 threads doing parallel writes, each to different tmpfs mounts:
No patch: ~300 MB/sec
With vm_stat alignment: ~430 MB/sec
Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Acked-by: Christoph Lameter <cl@gentwo.org>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r-- | mm/vmstat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index 56e529a40517..8fd603b1665e 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -78,7 +78,7 @@ void vm_events_fold_cpu(int cpu) | |||
78 | * | 78 | * |
79 | * vm_stat contains the global counters | 79 | * vm_stat contains the global counters |
80 | */ | 80 | */ |
81 | atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; | 81 | atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS] __cacheline_aligned_in_smp; |
82 | EXPORT_SYMBOL(vm_stat); | 82 | EXPORT_SYMBOL(vm_stat); |
83 | 83 | ||
84 | #ifdef CONFIG_SMP | 84 | #ifdef CONFIG_SMP |