Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c516610c authored by Jan Kara's avatar Jan Kara
Browse files

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: default avatarJan Kara <jack@suse.cz>
CC: Andrew Morton <akpm@linux-foundation.org>
parent 884d179d
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -129,9 +129,9 @@
 * i_mutex on quota files is special (it's below dqio_mutex)
 * i_mutex on quota files is special (it's below dqio_mutex)
 */
 */


static DEFINE_SPINLOCK(dq_list_lock);
static __cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_list_lock);
static DEFINE_SPINLOCK(dq_state_lock);
static __cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_state_lock);
DEFINE_SPINLOCK(dq_data_lock);
__cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_data_lock);
EXPORT_SYMBOL(dq_data_lock);
EXPORT_SYMBOL(dq_data_lock);


static char *quotatypes[] = INITQFNAMES;
static char *quotatypes[] = INITQFNAMES;