All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH 2/2] GFS2: Take advantage of new EXSH glock mode for rgrps
Date: Wed, 18 Apr 2018 15:39:40 -0400 (EDT)	[thread overview]
Message-ID: <1396928988.20968005.1524080380629.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <4b599258-ad4b-2187-cb77-f5268de164bf@redhat.com>

----- Original Message -----
> Hi,
> 
> 
> On 18/04/18 17:58, Bob Peterson wrote:
> > This patch switches rgrp locking to EXSH mode so that it's only
> > taken when the rgrp is added to an active transaction, or when
> > blocks are being reserved. As soon as the transaction is ended,
> > the rgrp exclusivity is released. This allows for rgrp sharing.
> Adding the rwsem looks like a good plan. I'm not sure that I understand
> why you need to lock the rgrp exclusively for the whole transaction and
> have added the new list. Do we really need to save the pid, or is that
> just there for debugging?
> 
> Steve.

Hi,

The reason I chose to do it this way is because I wanted to guarantee
any process twiddling any bit in the bitmap or any rgrp value would
have the lock exclusively. Before anyone can twiddle a bit, they need
to add the data to the transaction. Simple way to guarantee it.

I could add the appropriate locking before every place it needs
to twiddle the bits, but the patch will look a lot bigger.
I thought the transaction is a convenient and centrally-located
place for the locking, rather than scattering them about where
future maintainers could introduce deadlocks and such.

Regards,

Bob Peterson
Red Hat File Systems



  reply	other threads:[~2018-04-18 19:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-18 16:58 [Cluster-devel] [GFS2 PATCH v1 0/2] Improve throughput through rgrp sharing Bob Peterson
2018-04-18 16:58 ` [Cluster-devel] [GFS2 PATCH 1/2] GFS2: Introduce EXSH (exclusively shared on one node) Bob Peterson
2018-04-18 19:13   ` Steven Whitehouse
2018-04-18 19:32     ` Bob Peterson
2018-04-19  8:29       ` Steven Whitehouse
2018-04-18 16:58 ` [Cluster-devel] [GFS2 PATCH 2/2] GFS2: Take advantage of new EXSH glock mode for rgrps Bob Peterson
2018-04-18 19:25   ` Steven Whitehouse
2018-04-18 19:39     ` Bob Peterson [this message]
2018-04-19  8:43       ` Steven Whitehouse

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=1396928988.20968005.1524080380629.JavaMail.zimbra@redhat.com \
    --to=rpeterso@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.