mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
884d179dff
commit
c516610cfe
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue