aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glock.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2008-06-03 09:09:53 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2008-06-27 04:39:44 -0400
commit1bdad606338debc6384b2844f1b53cc436b3ac90 (patch)
tree7929bc1f652f88f104e8b6fa6a424cd211b50a42 /fs/gfs2/glock.c
parent9171f5a991e7613cbee816874ad8c9515dcab50f (diff)
[GFS2] Remove remote lock dropping code
There are several reasons why this is undesirable: 1. It never happens during normal operation anyway 2. If it does happen it causes performance to be very, very poor 3. It isn't likely to solve the original problem (memory shortage on remote DLM node) it was supposed to solve 4. It uses a bunch of arbitrary constants which are unlikely to be correct for any particular situation and for which the tuning seems to be a black art. 5. In an N node cluster, only 1/N of the dropped locked will actually contribute to solving the problem on average. So all in all we are better off without it. This also makes merging the lock_dlm module into GFS2 a bit easier. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/glock.c')
-rw-r--r--fs/gfs2/glock.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index be7ed503f012..8d5450f3c3ef 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -1316,11 +1316,6 @@ void gfs2_glock_cb(void *cb_data, unsigned int type, void *data)
1316 wake_up_process(sdp->sd_recoverd_process); 1316 wake_up_process(sdp->sd_recoverd_process);
1317 return; 1317 return;
1318 1318
1319 case LM_CB_DROPLOCKS:
1320 gfs2_gl_hash_clear(sdp, NO_WAIT);
1321 gfs2_quota_scan(sdp);
1322 return;
1323
1324 default: 1319 default:
1325 gfs2_assert_warn(sdp, 0); 1320 gfs2_assert_warn(sdp, 0);
1326 return; 1321 return;
@@ -1508,11 +1503,10 @@ static void clear_glock(struct gfs2_glock *gl)
1508 * @sdp: the filesystem 1503 * @sdp: the filesystem
1509 * @wait: wait until it's all gone 1504 * @wait: wait until it's all gone
1510 * 1505 *
1511 * Called when unmounting the filesystem, or when inter-node lock manager 1506 * Called when unmounting the filesystem.
1512 * requests DROPLOCKS because it is running out of capacity.
1513 */ 1507 */
1514 1508
1515void gfs2_gl_hash_clear(struct gfs2_sbd *sdp, int wait) 1509void gfs2_gl_hash_clear(struct gfs2_sbd *sdp)
1516{ 1510{
1517 unsigned long t; 1511 unsigned long t;
1518 unsigned int x; 1512 unsigned int x;
@@ -1527,7 +1521,7 @@ void gfs2_gl_hash_clear(struct gfs2_sbd *sdp, int wait)
1527 cont = 1; 1521 cont = 1;
1528 } 1522 }
1529 1523
1530 if (!wait || !cont) 1524 if (!cont)
1531 break; 1525 break;
1532 1526
1533 if (time_after_eq(jiffies, 1527 if (time_after_eq(jiffies,