aboutsummaryrefslogtreecommitdiffstats
path: root/fs/quota/dquot.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-01-26 09:32:46 -0500
committerJan Kara <jack@suse.cz>2009-03-25 21:18:35 -0400
commitc516610cfec5c50f84ff8cc315628548481f4990 (patch)
tree82d1a46721528dfd088a3edcfe5761a4d62fac26 /fs/quota/dquot.c
parent884d179dff3aa98a73c3ba9dee05fd6050d664f0 (diff)
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/quota/dquot.c')
-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 @@
129 * i_mutex on quota files is special (it's below dqio_mutex) 129 * i_mutex on quota files is special (it's below dqio_mutex)
130 */ 130 */
131 131
132static DEFINE_SPINLOCK(dq_list_lock); 132static __cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_list_lock);
133static DEFINE_SPINLOCK(dq_state_lock); 133static __cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_state_lock);
134DEFINE_SPINLOCK(dq_data_lock); 134__cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_data_lock);
135EXPORT_SYMBOL(dq_data_lock); 135EXPORT_SYMBOL(dq_data_lock);
136 136
137static char *quotatypes[] = INITQFNAMES; 137static char *quotatypes[] = INITQFNAMES;