From: David Teigland <teigland@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] gfs2: skip dlm_unlock calls in unmount
Date: Mon, 12 Nov 2012 10:46:48 -0500 [thread overview]
Message-ID: <20121112154648.GA23867@redhat.com> (raw)
In-Reply-To: <1352717076.2721.27.camel@menhir>
On Mon, Nov 12, 2012 at 10:44:36AM +0000, Steven Whitehouse wrote:
> > - save 64 bytes of memory for every local lock
> > (32 in gfs2_glock, 32 in dlm_rsb)
> >
> > - save 96 bytes of memory for every remote lock
> > (32 in gfs2_glock, 32 in local dlm_rsb, 32 in remote dlm_lkb)
> >
> > - save 32 bytes of network message size in many dlm messages
> >
> > - save a lot of memcpying of zeros
> >
> > - save some recovery time
> >
> >
>
> Yes, although we did consider what the best thing to do was back at the
> start of GFS2 development wrt LVBs. The actual overhead didn't seem too
> much really. The previous implementation had the LVB hanging off the
> glock from a pointer, so on 64 bit, that pointer alone was 8 bytes. We
> also saved another 4 bytes (plus a further 4 for alignment) by not
> requiring the atomic counter. So it seemed not unreasonable to just
> inline the LVB into the glock.
I still think you'll save around 64-80 bytes per lock on average.
> Another for having it on all glocks was that if we did want to start
> making use of it on different glock types in the future, we could do so
> without having to worry about whether its value would be preserved or
> not. Also, it removed some tests from the fast path of acquiring and
> dropping locks.
Keep in mind that the dlm does not inline them, so using an lvb when it's
not needed creates extra work in the dlm. This extra work probably
exceeds the extra work gfs2 would have to do with non-inlined lvbs.
> Trying to reduce the size of the lock requests makes sense if that is
> becoming a limiting factor in performance (is it? I'm not sure) so maybe
> we should revisit this.
I think it's worth a try, it's probably no less helpful than a lot of the
other optimizations we've added, which do add up together.
next prev parent reply other threads:[~2012-11-12 15:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-07 19:14 [Cluster-devel] gfs2: skip dlm_unlock calls in unmount David Teigland
2012-11-08 10:26 ` Steven Whitehouse
2012-11-08 15:41 ` David Teigland
2012-11-08 18:48 ` Steven Whitehouse
2012-11-08 19:59 ` David Teigland
2012-11-08 21:34 ` [Cluster-devel] [PATCH] " David Teigland
2012-11-09 9:45 ` Steven Whitehouse
2012-11-09 15:30 ` David Teigland
2012-11-12 10:44 ` Steven Whitehouse
2012-11-12 15:46 ` David Teigland [this message]
2012-11-13 15:58 ` David Teigland
2012-11-14 10:38 ` Steven Whitehouse
2012-11-09 14:55 ` [Cluster-devel] " 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=20121112154648.GA23867@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).