From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH v2] GFS2: Add a next-resource-group pointer to resource groups
Date: Tue, 12 Jan 2016 10:50:06 -0500 (EST) [thread overview]
Message-ID: <1820015789.8266446.1452613806370.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1452600234-30799-1-git-send-email-anprice@redhat.com>
----- Original Message -----
> Add a new rg_skip field to struct gfs2_rgrp, replacing __pad. The
> rg_skip field has the following meaning:
>
> - If rg_skip is zero, it is considered unset and not useful.
> - If rg_skip is non-zero, its value will be the number of blocks between
> this rgrp's address and the next rgrp's address. This can be used as a
> hint by fsck.gfs2 when rebuilding a bad rindex, for example.
>
> When gfs2_rgrp_bh_get() reads a resource group header and finds rg_skip
> to be 0 it will attempt to set it to the difference between its rd_addr
> and the rd_addr of the next resource group.
>
> The only special case is the final rgrp, which always has a rg_skip of
> 0. It is not set to a special value (like -1) because, when the
> filesystem is grown, the rgrp will no longer be the final one and it
> will then need to have its rg_skip field set. The overhead of this
> special case is a gfs2_rgrpd_get_next() call each time
> gfs2_rgrp_bh_get() is called for the final resource group.
>
> For the other resource groups, if the rg_skip field is 0, it is set
> appropriately and then the only overhead becomes the rgd->rg_skip == 0
> comparison in gfs2_rgrp_bh_get().
>
> Before this patch, gfs2_rgrp_out() zeroes the __pad field explicitly, so
> the rg_skip field can get set back to 0 in cases where nodes with and
> without this patch are mixed in a cluster. In some cases, the field may
> bounce between being set by one node and then zeroed by another which
> may harm performance slightly, e.g. when two nodes create many small
> files. In testing this situation is rare but it becomes more likely as
> the filesystem fills up and there are fewer resource groups to choose
> from. The problem goes away when all nodes are running with this patch.
> Dipping into the space currently occupied by the rg_reserved field would
> have resulted in the same problem as it is also explicitly zeroed, so
> unfortunately there is no other way around it.
>
> Signed-off-by: Andrew Price <anprice@redhat.com>
Hi Andy,
I've been talking about doing something like this for years, so it's
good to see someone finally acting on it.
Although this is a good first stab at the solution, my main concern about
this implementation is that, AFAICT, it doesn't take read-only mounts into
account. In fact, a "spectator" mount might even cause it to BUG_ON from
gfs2_trans_begin, since there's no journal. But it's close.
Regards,
Bob Peterson
Red Hat File Systems
next prev parent reply other threads:[~2016-01-12 15:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-12 11:39 [Cluster-devel] [PATCH] GFS2: Add a next-resource-group pointer to resource groups Andrew Price
2016-01-12 11:47 ` Steven Whitehouse
2016-01-12 12:03 ` [Cluster-devel] [PATCH v2] " Andrew Price
2016-01-12 15:50 ` Bob Peterson [this message]
2017-02-02 14:57 ` Andrew Price
2017-02-13 17:59 ` [Cluster-devel] [PATCH v3] " Andrew Price
2017-02-13 18:06 ` Andrew Price
2017-02-14 10:32 ` Steven Whitehouse
2017-02-15 18:15 ` Andreas Gruenbacher
2016-01-12 12:39 ` [Cluster-devel] [PATCH] " Andreas Gruenbacher
2016-01-12 13:12 ` Andrew Price
2016-01-12 13:30 ` Andreas Gruenbacher
2016-01-12 15:23 ` Andrew Price
2017-02-15 17:40 ` Andreas Gruenbacher
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=1820015789.8266446.1452613806370.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.