From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Mon, 15 Jun 2015 12:19:13 +0100 Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Don't add rgrp glocks to the lru In-Reply-To: <1745858852.16090144.1434133747424.JavaMail.zimbra@redhat.com> References: <1745858852.16090144.1434133747424.JavaMail.zimbra@redhat.com> Message-ID: <557EB4B1.9040000@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, On 12/06/15 19:29, Bob Peterson wrote: > 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 Acked-by: Steven Whitehouse Steve. > --- > 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); >