cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [DLM PATCH] DLM: Don't wait for resource library lookups if NOLOOKUP is specified
Date: Wed, 1 Oct 2014 13:42:24 -0500	[thread overview]
Message-ID: <20141001184224.GA10150@redhat.com> (raw)
In-Reply-To: <1631293570.1178953.1412184101732.JavaMail.zimbra@redhat.com>

On Wed, Oct 01, 2014 at 01:21:41PM -0400, Bob Peterson wrote:
> Hi,
> 
> This patch adds a new lock flag, DLM_LKF_NOLOOKUP, which instructs DLM
> to refrain from sending lookup requests in cases where the lock library
> node is not the current node. This is similar to the DLM_LKF_NOQUEUE
> flag, except it fails locks that would require a lookup, with -EAGAIN.

Can we just use NOQUEUE?  It tells you that there's a lock conflict, which
tells you to move along and try another if you don't want to contend.  If
you cache acquired locks and reuse them, then it doesn't matter if the
master node is remote or local.

If lookups are a problem in general, there is the "nodir" lockspace mode,
which replaces the resource directory lookup system with a static mapping
of resources to master nodes.

> This is not just about saving a network operation. It allows callers
> like GFS2 to master locks for which they are the directory node. Each
> node can then "prefer" local locks, especially in the case of GFS2
> selecting resource groups for block allocations (implemented with a
> separate patch). This mastering of local locks distributes the locks
> between the nodes (at least until nodes enter or leave the cluster),
> which tends to make each node "keep to itself" when doing allocations.
> Thus, dlm communications are kept to a minimum, which results in
> significantly faster block allocations.

Back in 2002 I solved what sounds like the same problem in gfs(1).  It
allowed all nodes to allocate blocks independent of each other, without
constant locking.  You can see the solution here:

https://git.fedorahosted.org/cgit/cluster.git/tree/gfs-kernel/src/gfs/rgrp.c?h=RHEL4




  parent reply	other threads:[~2014-10-01 18:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <38741039.1176852.1412183985958.JavaMail.zimbra@redhat.com>
2014-10-01 17:21 ` [Cluster-devel] [DLM PATCH] DLM: Don't wait for resource library lookups if NOLOOKUP is specified Bob Peterson
2014-10-01 18:04   ` Steven Whitehouse
2014-10-03 17:24     ` Bob Peterson
2014-10-01 18:42   ` David Teigland [this message]
2014-10-03 17:28     ` Bob Peterson

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=20141001184224.GA10150@redhat.com \
    --to=teigland@redhat.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).