lkml.org 
[lkml]   [2011]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] cache align vm_stat
    Avoid false sharing of the vm_stat array.

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

    Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
    ---
    mm/vmstat.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    Index: linux/mm/vmstat.c
    ===================================================================
    --- linux.orig/mm/vmstat.c
    +++ 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

    \
     
     \ /
      Last update: 2011-10-24 18:13    [W:0.035 / U:3.484 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site