diff options
author | Jan Kara <jack@suse.cz> | 2009-01-26 09:32:46 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2009-03-25 21:18:35 -0400 |
commit | c516610cfec5c50f84ff8cc315628548481f4990 (patch) | |
tree | 82d1a46721528dfd088a3edcfe5761a4d62fac26 /fs/quota | |
parent | 884d179dff3aa98a73c3ba9dee05fd6050d664f0 (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')
-rw-r--r-- | fs/quota/dquot.c | 6 |
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 | ||
132 | static DEFINE_SPINLOCK(dq_list_lock); | 132 | static __cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_list_lock); |
133 | static DEFINE_SPINLOCK(dq_state_lock); | 133 | static __cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_state_lock); |
134 | DEFINE_SPINLOCK(dq_data_lock); | 134 | __cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_data_lock); |
135 | EXPORT_SYMBOL(dq_data_lock); | 135 | EXPORT_SYMBOL(dq_data_lock); |
136 | 136 | ||
137 | static char *quotatypes[] = INITQFNAMES; | 137 | static char *quotatypes[] = INITQFNAMES; |