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] [GFs2] Remove reclaim logic from rq_promote()
Date: Mon, 30 Jul 2007 10:32:18 +0100	[thread overview]
Message-ID: <11857879523305-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <11857879512912-git-send-email-swhiteho@redhat.com>

There is no need to reclaim glocks in this code path since
the glockd does this for us anyway. Also the limit of 5000
is entirely aribtrary and it doesn't make sense to slow down
this (fast path) when its not actually responsible for generating
reclaimable glocks.

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

diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 6324f57..be0368b 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -481,7 +481,6 @@ static int rq_promote(struct gfs2_glock *gl)
 {
 	struct gfs2_holder *gh = list_entry(gl->gl_waiters3.next,
 					    struct gfs2_holder, gh_list);
-	struct gfs2_sbd *sdp = gl->gl_sbd;
 
 	BUG_ON(test_bit(HIF_PROMOTE, &gh->gh_iflags) == 0);
 	if (!relaxed_state_ok(gl->gl_state, gh->gh_state, gh->gh_flags)) {
@@ -489,14 +488,6 @@ static int rq_promote(struct gfs2_glock *gl)
 			gl->gl_req_gh = gh;
 			set_bit(GLF_LOCK, &gl->gl_flags);
 			spin_unlock(&gl->gl_spin);
-
-			if (atomic_read(&sdp->sd_reclaim_count) >
-			    gfs2_tune_get(sdp, gt_reclaim_limit) &&
-			    !(gh->gh_flags & LM_FLAG_PRIORITY)) {
-				gfs2_reclaim_glock(sdp);
-				gfs2_reclaim_glock(sdp);
-			}
-
 			gfs2_glock_xmote_th(gh->gh_gl, gh);
 			spin_lock(&gl->gl_spin);
 		}
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 8b91f83..4a48ded 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -446,7 +446,6 @@ struct gfs2_tune {
 	unsigned int gt_lockdump_size;
 	unsigned int gt_stall_secs; /* Detects trouble! */
 	unsigned int gt_complain_secs;
-	unsigned int gt_reclaim_limit; /* Max num of glocks in reclaim list */
 	unsigned int gt_statfs_quantum;
 	unsigned int gt_statfs_slow;
 };
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index f916b97..78987db 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -75,7 +75,6 @@ void gfs2_tune_init(struct gfs2_tune *gt)
 	gt->gt_lockdump_size = 131072;
 	gt->gt_stall_secs = 600;
 	gt->gt_complain_secs = 10;
-	gt->gt_reclaim_limit = 5000;
 	gt->gt_statfs_quantum = 30;
 	gt->gt_statfs_slow = 0;
 }
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c
index c26c21b..b3ba9f1 100644
--- a/fs/gfs2/sys.c
+++ b/fs/gfs2/sys.c
@@ -434,7 +434,6 @@ TUNE_ATTR(quota_quantum, 0);
 TUNE_ATTR(atime_quantum, 0);
 TUNE_ATTR(max_readahead, 0);
 TUNE_ATTR(complain_secs, 0);
-TUNE_ATTR(reclaim_limit, 0);
 TUNE_ATTR(statfs_slow, 0);
 TUNE_ATTR(new_files_jdata, 0);
 TUNE_ATTR(new_files_directio, 0);
@@ -458,7 +457,6 @@ static struct attribute *tune_attrs[] = {
 	&tune_attr_atime_quantum.attr,
 	&tune_attr_max_readahead.attr,
 	&tune_attr_complain_secs.attr,
-	&tune_attr_reclaim_limit.attr,
 	&tune_attr_statfs_slow.attr,
 	&tune_attr_quota_simul_sync.attr,
 	&tune_attr_quota_cache_secs.attr,
-- 
1.5.1.2



  reply	other threads:[~2007-07-30  9:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-30  9:32 [Cluster-devel] [GFS2] Clean up glock layer Steven Whitehouse
2007-07-30  9:32 ` [Cluster-devel] [PATCH] [GFS2] Clean up arguments to rq_mutex/rq_promote Steven Whitehouse
2007-07-30  9:32   ` [Cluster-devel] [PATCH] [GFS2] Clean up run_queue() Steven Whitehouse
2007-07-30  9:32     ` [Cluster-devel] [PATCH] [GFS2] Merge ->go_drop_th() with ->go_xmote_th() Steven Whitehouse
2007-07-30  9:32       ` [Cluster-devel] [PATCH] [GFS2] Merge gfs2_glock_drop_th() into gfs2_glock_xmote_th() Steven Whitehouse
2007-07-30  9:32         ` Steven Whitehouse [this message]
2007-08-02 13:39     ` [Cluster-devel] [PATCH] [GFS2] Clean up run_queue() David Teigland

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=11857879523305-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).