From: Bob Peterson Date: Mon, 15 Jan 2018 10:48:28 -0500 (EST) Subject: [Cluster-devel] [GFS2 PATCH 2/6] GFS2: Check gfs2_rgrp_used_recently inside gfs2_rgrp_congested In-Reply-To: <9314101d-6f0f-2f42-660c-dd6641d07f0d@redhat.com> References: <20180110204227.20315-1-rpeterso@redhat.com> <20180110204227.20315-3-rpeterso@redhat.com> <9314101d-6f0f-2f42-660c-dd6641d07f0d@redhat.com> Message-ID: <1790622865.7035793.1516031308861.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, ----- Original Message ----- | Hi, | | | On 10/01/18 20:42, Bob Peterson wrote: | > Function gfs2_rgrp_congested is called in two places: once before | > we acquire the rgrp glock, and once after. The first time, it checks | > to see if the rgrp was used recently because the usage statistics | > are only valid in short-term. For the second call, that check was | > not done, but should have been, for the same reason. | > | > This patch simply moves function gfs2_rgrp_used_recently before | > function gfs2_rgrp_congested, and it's now called from there so | > it applies equally to both checks. | I don't think this makes sense. The purpose of the | gfs2_rgrp_used_recently test is that when we don't hold the glock we | might not have up to date stats to make decisions from, so we check that | we've held the lock recently enough that we can use historical | statistics. Once we hold the lock however, then we can be sure that the | stats are up to date, as the process of acquiring the lock will bring | them up to date, so why repeat the test when we already have the lock? | | Steve. Hm. I'll admit it's been a long time since I revisited this patch set, but you've got a valid point. This makes no sense. I'll pull this patch. Bob Peterson Red Hat File Systems