linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: linux-fsdevel@vger.kernel.org
Cc: Jan Kara <jack@suse.cz>, Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 02/16] quota: Make global quota locks cacheline aligned
Date: Tue, 27 Jan 2009 17:48:35 +0100	[thread overview]
Message-ID: <1233074929-12277-3-git-send-email-jack@suse.cz> (raw)
In-Reply-To: <1233074929-12277-2-git-send-email-jack@suse.cz>

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>
---
 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 28aa146..e840fa2 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;
-- 
1.6.0.2


  reply	other threads:[~2009-01-27 16:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-27 16:48 [PATCH 00/16] Quota cleanups Jan Kara
2009-01-27 16:48 ` [PATCH 01/16] quota: Move quota files into separate directory Jan Kara
2009-01-27 16:48   ` Jan Kara [this message]
2009-01-27 16:48     ` [PATCH 03/16] quota: Remove NODQUOT macro Jan Kara
2009-01-27 16:48       ` [PATCH 04/16] quota: Remove dqbuf_t and other cleanups Jan Kara
2009-01-27 16:48         ` [PATCH 05/16] vfs: Use lowercase names of quota functions Jan Kara
2009-01-27 16:48           ` [PATCH 06/16] ramfs: Remove quota call Jan Kara
2009-01-27 16:48             ` [PATCH 07/16] ext2: Use lowercase names of quota functions Jan Kara
2009-01-27 16:48               ` [PATCH 08/16] ext3: " Jan Kara
2009-01-27 16:48                 ` [PATCH 09/16] ext4: " Jan Kara
2009-01-27 16:48                   ` [PATCH 10/16] reiserfs: " Jan Kara
2009-01-27 16:48                     ` [PATCH 11/16] ufs: " Jan Kara
2009-01-27 16:48                       ` [PATCH 12/16] udf: " Jan Kara
2009-01-27 16:48                         ` [PATCH 13/16] jfs: " Jan Kara
2009-01-27 16:48                           ` [PATCH 14/16] quota: Remove uppercase aliases for " Jan Kara
2009-01-27 16:48                             ` [PATCH 15/16] quota: Remove superfluous inlines Jan Kara
2009-01-27 16:48                               ` [PATCH 16/16] quota: Coding style fixes Jan Kara
2009-01-28 23:46                           ` [PATCH 13/16] jfs: Use lowercase names of quota functions Dave Kleikamp
2009-01-28  0:13                   ` [PATCH 09/16] ext4: " Mingming Cao
2009-01-27 17:13           ` [PATCH 05/16] vfs: " Christoph Hellwig
2009-01-27 17:35             ` Jan Kara
2009-01-28 17:19               ` Christoph Hellwig
2009-01-28 23:09                 ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1233074929-12277-3-git-send-email-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).