From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2:dlm: avoid dlm->ast_lock lockres->spinlock dependency break
Date: Tue, 18 May 2010 12:15:42 -0700 [thread overview]
Message-ID: <20100518191542.GC3239@mail.oracle.com> (raw)
In-Reply-To: <201005171221.o4H8oUwB022995@rcsinet13.oracle.com>
On Mon, May 17, 2010 at 08:20:44PM +0800, Wengang Wang wrote:
> Currently we process a dirty lockres with the lockres->spinlock taken. While
> during the process, we may need to lock on dlm->ast_lock. This breaks the
> dependency of dlm->ast_lock(lock first) and lockres->spinlock(lock second).
>
> This patch fixes the problem.
> Since we can't release lockres->spinlock, we have to take dlm->ast_lock
> just before taking the lockres->spinlock and release it after lockres->spinlock
> is released. And use __dlm_queue_bast()/__dlm_queue_ast(), the nolock version,
> in dlm_shuffle_lists(). There are no too many locks on a lockres, so there is no
> performance harm.
>
> Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
This patch is now in the 'fixes' branch of ocfs2.git.
Joel
--
"One of the symptoms of an approaching nervous breakdown is the
belief that one's work is terribly important."
- Bertrand Russell
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
prev parent reply other threads:[~2010-05-18 19:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-17 12:20 [Ocfs2-devel] [PATCH] ocfs2:dlm: avoid dlm->ast_lock lockres->spinlock dependency break Wengang Wang
2010-05-18 19:15 ` Joel Becker [this message]
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=20100518191542.GC3239@mail.oracle.com \
--to=joel.becker@oracle.com \
--cc=ocfs2-devel@oss.oracle.com \
/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).