From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Fri, 12 Jun 2015 14:29:07 -0400 (EDT) Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Don't add rgrp glocks to the lru In-Reply-To: <512846443.16088997.1434133529467.JavaMail.zimbra@redhat.com> Message-ID: <1745858852.16090144.1434133747424.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, The glocks used for resource groups often come and go hundreds of thousands of times per second. Adding them to the lru list just adds unnecessary contention for the lru_lock spin_lock, especially considering we're almost certainly going to re-use the glock and take it back off the lru microseconds later. We never want the glock shrinker to cull them anyway. This patch bypasses adding them to the lru. Regards, Bob Peterson Red Hat File Systems Signed-off-by: Bob Peterson --- diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 0fa8062..1db06a5 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1076,7 +1076,8 @@ void gfs2_glock_dq(struct gfs2_holder *gh) !test_bit(GLF_DEMOTE, &gl->gl_flags)) fast_path = 1; } - if (!test_bit(GLF_LFLUSH, &gl->gl_flags) && demote_ok(gl)) + if (!test_bit(GLF_LFLUSH, &gl->gl_flags) && demote_ok(gl) && + gl->gl_name.ln_type != LM_TYPE_RGRP) gfs2_glock_add_to_lru(gl); trace_gfs2_glock_queue(gh, 0);