From: David Teigland <teigland@redhat.com>
To: Mark Fasheh <mark.fasheh@oracle.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1a/7] dlm: core locking
Date: Fri, 29 Apr 2005 13:56:19 +0800 [thread overview]
Message-ID: <20050429055619.GD9900@redhat.com> (raw)
In-Reply-To: <20050428192112.GA355@ca-server1.us.oracle.com>
On Thu, Apr 28, 2005 at 12:21:12PM -0700, Mark Fasheh wrote:
> > Just to clarify, though: when the LOCAL resource is immediately created
> > and mastered locally, there must be a resource directory entry added for
> > it, right? For us, the resource directory entry is added as part of a new
> > master lookup (which is being skipped). If you don't add a directory
> > entry, how does another node that later wants to lock the same resource
> > (without LOCAL) discover who the master is?
> Yes, I believe LOCAL would always have to at least add a directory entry.
> For the OCFS2 dlm which does not use a resource directory, the entry would
> just exist on the creating node and other nodes would discover it later via
> query.
OK, sounds like an interesting tradeoff. If any node can be master of a
resource, and there's no resource directory, then any new non-LOCAL
request must query every other node to check if it's the master. A look
at your dlm shows this is the case:
while ((nodenum = dlm_node_iter_next(&iter)) >= 0) {
ret = dlm_do_master_request(mle, nodenum);
Of course with a directory you just query one node to find if/who the
master is. Which is better would depend on the usage.
If you wanted to do a similar optimization as LOCAL with our dlm, you'd
use parent/child locks where the parent at the top of the tree would
require a lookup but all the child locks would only require local
processing.
> > If I understand LOCAL correctly, it should be simple for us to do. We'd
> > still have a LOCAL request _send_ the lookup to create the directory
> > entry, but we'd simply not wait for the reply. We'd assume, based on
> > LOCAL, that the lookup result indicates we're the master.
> I assume then that you can do that without racing the node who sent the
> LOCAL request and another node who comes in (just afterwards) for a master
> lookup? I bet the answer to that question would come to me if I read more of
> the code :)
Nope, my speculation on how we might do LOCAL above wouldn't work. It now
seems clear that LOCAL can't really be done with a directory.
Dave
prev parent reply other threads:[~2005-04-29 5:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-25 16:57 [PATCH 1a/7] dlm: core locking David Teigland
2005-04-25 17:40 ` Nish Aravamudan
2005-04-25 21:17 ` Jesper Juhl
2005-04-26 5:10 ` Daniel Phillips
2005-04-26 8:43 ` David Teigland
2005-04-25 22:46 ` Pavel Machek
2005-04-27 14:48 ` Paul Jackson
2005-04-27 21:41 ` Mark Fasheh
2005-04-28 2:41 ` Daniel Phillips
2005-04-28 12:21 ` Lars Marowsky-Bree
2005-04-29 8:05 ` Daniel Phillips
2005-04-28 3:45 ` David Teigland
2005-04-28 13:48 ` Stephen C. Tweedie
2005-04-28 17:19 ` Joel Becker
2005-04-29 8:10 ` Daniel Phillips
2005-04-29 21:52 ` Mark Fasheh
2005-04-30 0:50 ` Daniel Phillips
2005-04-28 19:21 ` Mark Fasheh
2005-04-29 5:56 ` David Teigland [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=20050429055619.GD9900@redhat.com \
--to=teigland@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.fasheh@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