Commit a1cb2c60 authored by Dimitri Sivanich's avatar Dimitri Sivanich Committed by Linus Torvalds

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: default avatarDimitri Sivanich <>
Acked-by: default avatarChristoph Lameter <>
Acked-by: default avatarMel Gorman <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 3d470fc3
......@@ -78,7 +78,7 @@ void vm_events_fold_cpu(int cpu)
* vm_stat contains the global counters
atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS] __cacheline_aligned_in_smp;
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