Skip to contentSkip to conversation

cache align vm_stat

PATCH In review Dimitri Sivanich 3 participants 5 messages Oct 24, 2011 – Oct 31, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cache align vm_stat

Avoid false sharing of the vm_stat array.

This was found to adversely affect tmpfs I/O performance.

---
 mm/vmstat.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmstat.c +1 -1
Index: linux/mm/vmstat.c
===================================================================
@@ -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;
 EXPORT_SYMBOL(vm_stat);
 
 #ifdef CONFIG_SMP

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

maintainer
#2 lore raw
Quoted 3 lines · On Wed, 26 Oct 2011 21:31:46 -0500 (CDT) Christoph Lameter <[email protected]>…
Quoted 1 line · Dimitri Sivanich

Avoid false sharing of the vm_stat array.

Did we have some nice machine-description and measurement results which can be included in the changelog? Such things should always be included with a performace patch!

Quoted 1 line

Do [email protected], [email protected] and [email protected] still work?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#3 lore raw
Quoted 2 lines · Andrew Morton

Do [email protected], [email protected] and [email protected] still work?

Yes but [email protected] should only be used for private matters. The other two had some hiccups in the last weeks. I think I may be going back to linux.com once I feel confident that the issues have all been worked out.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#4 lore raw
In reply to Andrew Morton
Quoted 11 lines · Andrew Morton
Quoted 3 lines · On Wed, 26 Oct 2011 21:31:46 -0500 (CDT) Christoph Lameter <[email protected]>…
Quoted 1 line · Dimitri Sivanich

Avoid false sharing of the vm_stat array.

Did we have some nice machine-description and measurement results which can be included in the changelog? Such things should always be included with a performace patch!

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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>