aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-01-26 15:32:46 +0100
committerJan Kara <jack@suse.cz>2009-03-26 02:18:35 +0100
commitc516610cfec5c50f84ff8cc315628548481f4990 (patch)
tree82d1a46721528dfd088a3edcfe5761a4d62fac26 /fs
parentquota: Move quota files into separate directory (diff)
downloadlinux-dev-c516610cfec5c50f84ff8cc315628548481f4990.tar.xz
linux-dev-c516610cfec5c50f84ff8cc315628548481f4990.zip
quota: Make global quota locks cacheline aligned
Andrew Morton has suggested that three global quota locks can end up in the same cacheline which can result in bad cacheline ping-pong on SMP machines. Make locks cacheline aligned so that we avoid this problem (thanks goes to Andrew for the idea). Signed-off-by: Jan Kara <jack@suse.cz> CC: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/quota/dquot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 28aa14667602..e840fa2b112e 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -129,9 +129,9 @@
* i_mutex on quota files is special (it's below dqio_mutex)
*/
-static DEFINE_SPINLOCK(dq_list_lock);
-static DEFINE_SPINLOCK(dq_state_lock);
-DEFINE_SPINLOCK(dq_data_lock);
+static __cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_list_lock);
+static __cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_state_lock);
+__cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_data_lock);
EXPORT_SYMBOL(dq_data_lock);
static char *quotatypes[] = INITQFNAMES;