cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 6/8] GFS2: Allow caching of glocks for flock
Date: Fri, 18 Jul 2014 11:37:43 +0100	[thread overview]
Message-ID: <1405679865-15728-7-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1405679865-15728-1-git-send-email-swhiteho@redhat.com>

From: Bob Peterson <rpeterso@redhat.com>

This patch removes the GLF_NOCACHE flag from the glocks associated with
flocks. There should be no good reason not to cache glocks for flocks:
they only force the glock to be demoted before they can be reacquired,
which can slow down performance and even cause glock hangs, especially
in cases where the flocks are held in Shared (SH) mode.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>

diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 491e8e0..26b3f95 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -981,7 +981,7 @@ static int do_flock(struct file *file, int cmd, struct file_lock *fl)
 	int error = 0;
 
 	state = (fl->fl_type == F_WRLCK) ? LM_ST_EXCLUSIVE : LM_ST_SHARED;
-	flags = (IS_SETLKW(cmd) ? 0 : LM_FLAG_TRY) | GL_EXACT | GL_NOCACHE;
+	flags = (IS_SETLKW(cmd) ? 0 : LM_FLAG_TRY) | GL_EXACT;
 
 	mutex_lock(&fp->f_fl_mutex);
 
-- 
1.8.3.1



  parent reply	other threads:[~2014-07-18 10:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-18 10:37 [Cluster-devel] GFS2: Pre-pull patch posting (fixes) Steven Whitehouse
2014-07-18 10:37 ` [Cluster-devel] [PATCH 1/8] GFS2: Only wait for demote when last holder is dequeued Steven Whitehouse
2014-07-18 10:37 ` [Cluster-devel] [PATCH 2/8] GFS2: Fix race in glock lru glock disposal Steven Whitehouse
2014-07-18 10:37 ` [Cluster-devel] [PATCH 3/8] GFS2: Use GFP_NOFS when allocating glocks Steven Whitehouse
2014-07-18 10:37 ` [Cluster-devel] [PATCH 4/8] GFS2: replace count*size kzalloc by kcalloc Steven Whitehouse
2014-07-18 10:37 ` [Cluster-devel] [PATCH 5/8] GFS2: Allow flocks to use normal glock dq rather than dq_wait Steven Whitehouse
2014-07-18 10:37 ` Steven Whitehouse [this message]
2014-07-18 10:37 ` [Cluster-devel] [PATCH 7/8] GFS2: memcontrol: Spelling s/invlidate/invalidate/ Steven Whitehouse
2014-07-18 10:37 ` [Cluster-devel] [PATCH 8/8] GFS2: fs/gfs2/rgrp.c: kernel-doc warning fixes 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=1405679865-15728-7-git-send-email-swhiteho@redhat.com \
    --to=swhiteho@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).