From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932971Ab1JXQKl (ORCPT ); Mon, 24 Oct 2011 12:10:41 -0400 Received: from relay1.sgi.com ([192.48.179.29]:39872 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932270Ab1JXQKk (ORCPT ); Mon, 24 Oct 2011 12:10:40 -0400 Date: Mon, 24 Oct 2011 11:10:35 -0500 From: Dimitri Sivanich To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Andrew Morton , Christoph Lameter , David Rientjes , Andi Kleen , Mel Gorman Subject: [PATCH] cache align vm_stat Message-ID: <20111024161035.GA19820@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Avoid false sharing of the vm_stat array. This was found to adversely affect tmpfs I/O performance. Signed-off-by: Dimitri Sivanich --- 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