From: Dimitri Sivanich <sivanich@sgi.com>
To: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Christoph Lameter <cl@gentwo.org>,
David Rientjes <rientjes@google.com>,
Andi Kleen <andi@firstfloor.org>, Mel Gorman <mel@csn.ul.ie>
Subject: [PATCH] cache align vm_stat
Date: Mon, 24 Oct 2011 11:10:35 -0500 [thread overview]
Message-ID: <20111024161035.GA19820@sgi.com> (raw)
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
WARNING: multiple messages have this Message-ID (diff)
From: Dimitri Sivanich <sivanich@sgi.com>
To: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Christoph Lameter <cl@gentwo.org>,
David Rientjes <rientjes@google.com>,
Andi Kleen <andi@firstfloor.org>, Mel Gorman <mel@csn.ul.ie>
Subject: [PATCH] cache align vm_stat
Date: Mon, 24 Oct 2011 11:10:35 -0500 [thread overview]
Message-ID: <20111024161035.GA19820@sgi.com> (raw)
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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. 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:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2011-10-24 16:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-24 16:10 Dimitri Sivanich [this message]
2011-10-24 16:10 ` [PATCH] cache align vm_stat Dimitri Sivanich
2011-10-27 2:31 ` Christoph Lameter
2011-10-27 2:31 ` Christoph Lameter
2011-10-28 22:54 ` Andrew Morton
2011-10-28 22:54 ` Andrew Morton
2011-10-29 5:22 ` Christoph Lameter
2011-10-29 5:22 ` Christoph Lameter
2011-10-31 13:37 ` Dimitri Sivanich
2011-10-31 13:37 ` Dimitri Sivanich
-- strict thread matches above, loose matches on Subject: below --
2011-10-27 8:50 Mel Gorman
2011-10-27 8:50 ` Mel Gorman
2011-10-27 12:51 ` Dimitri Sivanich
2011-10-27 12:51 ` Dimitri Sivanich
2011-10-27 14:29 ` Mel Gorman
2011-10-27 14:29 ` Mel Gorman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111024161035.GA19820@sgi.com \
--to=sivanich@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=cl@gentwo.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=rientjes@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.