aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glops.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2007-01-18 17:44:20 +0000
committerSteven Whitehouse <swhiteho@redhat.com>2007-02-05 13:37:14 -0500
commite5dab552c82ce416d7be867b1e5a0fa585dcf590 (patch)
tree3719a33f1bd5a29785e4ca35982d9610dd5a1a63 /fs/gfs2/glops.c
parentfee852e374fb367c5436b1226eb93b35f8355ed9 (diff)
downloadkernel_samsung_smdk4412-e5dab552c82ce416d7be867b1e5a0fa585dcf590.zip
kernel_samsung_smdk4412-e5dab552c82ce416d7be867b1e5a0fa585dcf590.tar.gz
kernel_samsung_smdk4412-e5dab552c82ce416d7be867b1e5a0fa585dcf590.tar.bz2
[GFS2] Remove the "greedy" function from glock.[ch]
The "greedy" code was an attempt to retain glocks for a minimum length of time when they relate to mmap()ed files. The current implementation of this feature is not, however, ideal in that it required allocating memory in order to do this and its overly complicated. It also misses the mark by ignoring the other I/O operations which are just as likely to suffer from the same problem. So the plan is to remove this now and then add the functionality back as part of the glock state machine at a later date (and thus take into account all the possible users of this feature) Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r--fs/gfs2/glops.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index b068d10..e4da26f 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -319,39 +319,6 @@ static void inode_go_unlock(struct gfs2_holder *gh)
}
/**
- * inode_greedy -
- * @gl: the glock
- *
- */
-
-static void inode_greedy(struct gfs2_glock *gl)
-{
- struct gfs2_sbd *sdp = gl->gl_sbd;
- struct gfs2_inode *ip = gl->gl_object;
- unsigned int quantum = gfs2_tune_get(sdp, gt_greedy_quantum);
- unsigned int max = gfs2_tune_get(sdp, gt_greedy_max);
- unsigned int new_time;
-
- spin_lock(&ip->i_spin);
-
- if (time_after(ip->i_last_pfault + quantum, jiffies)) {
- new_time = ip->i_greedy + quantum;
- if (new_time > max)
- new_time = max;
- } else {
- new_time = ip->i_greedy - quantum;
- if (!new_time || new_time > max)
- new_time = 1;
- }
-
- ip->i_greedy = new_time;
-
- spin_unlock(&ip->i_spin);
-
- iput(&ip->i_inode);
-}
-
-/**
* rgrp_go_demote_ok - Check to see if it's ok to unlock a RG's glock
* @gl: the glock
*
@@ -492,7 +459,6 @@ const struct gfs2_glock_operations gfs2_inode_glops = {
.go_demote_ok = inode_go_demote_ok,
.go_lock = inode_go_lock,
.go_unlock = inode_go_unlock,
- .go_greedy = inode_greedy,
.go_type = LM_TYPE_INODE,
};