aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glops.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2007-01-18 12:44:20 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2007-02-05 13:37:14 -0500
commite5dab552c82ce416d7be867b1e5a0fa585dcf590 (patch)
tree3719a33f1bd5a29785e4ca35982d9610dd5a1a63 /fs/gfs2/glops.c
parentfee852e374fb367c5436b1226eb93b35f8355ed9 (diff)
[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 b068d10bcb6e..e4da26fe406f 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -319,39 +319,6 @@ static void inode_go_unlock(struct gfs2_holder *gh)
319} 319}
320 320
321/** 321/**
322 * inode_greedy -
323 * @gl: the glock
324 *
325 */
326
327static void inode_greedy(struct gfs2_glock *gl)
328{
329 struct gfs2_sbd *sdp = gl->gl_sbd;
330 struct gfs2_inode *ip = gl->gl_object;
331 unsigned int quantum = gfs2_tune_get(sdp, gt_greedy_quantum);
332 unsigned int max = gfs2_tune_get(sdp, gt_greedy_max);
333 unsigned int new_time;
334
335 spin_lock(&ip->i_spin);
336
337 if (time_after(ip->i_last_pfault + quantum, jiffies)) {
338 new_time = ip->i_greedy + quantum;
339 if (new_time > max)
340 new_time = max;
341 } else {
342 new_time = ip->i_greedy - quantum;
343 if (!new_time || new_time > max)
344 new_time = 1;
345 }
346
347 ip->i_greedy = new_time;
348
349 spin_unlock(&ip->i_spin);
350
351 iput(&ip->i_inode);
352}
353
354/**
355 * rgrp_go_demote_ok - Check to see if it's ok to unlock a RG's glock 322 * rgrp_go_demote_ok - Check to see if it's ok to unlock a RG's glock
356 * @gl: the glock 323 * @gl: the glock
357 * 324 *
@@ -492,7 +459,6 @@ const struct gfs2_glock_operations gfs2_inode_glops = {
492 .go_demote_ok = inode_go_demote_ok, 459 .go_demote_ok = inode_go_demote_ok,
493 .go_lock = inode_go_lock, 460 .go_lock = inode_go_lock,
494 .go_unlock = inode_go_unlock, 461 .go_unlock = inode_go_unlock,
495 .go_greedy = inode_greedy,
496 .go_type = LM_TYPE_INODE, 462 .go_type = LM_TYPE_INODE,
497}; 463};
498 464