aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_super.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2008-11-20 08:39:47 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2009-01-05 02:39:09 -0500
commit97cc1025b1a91c52e84f12478dcf0f853abc6564 (patch)
treecd71419049aeb13eea7012889d0ee0c715394e4d /fs/gfs2/ops_super.c
parent9ac1b4d9b6f885ccd7d8f56bceb609003a920ff7 (diff)
GFS2: Kill two daemons with one patch
This patch removes the two daemons, gfs2_scand and gfs2_glockd and replaces them with a shrinker which is called from the VM. The net result is that GFS2 responds better when there is memory pressure, since it shrinks the glock cache at the same rate as the VFS shrinks the dcache and icache. There are no longer any time based criteria for shrinking glocks, they are kept until such time as the VM asks for more memory and then we demote just as many glocks as required. There are potential future changes to this code, including the possibility of sorting the glocks which are to be written back into inode number order, to get a better I/O ordering. It would be very useful to have an elevator based workqueue implementation for this, as that would automatically deal with the read I/O cases at the same time. This patch is my answer to Andrew Morton's remark, made during the initial review of GFS2, asking why GFS2 needs so many kernel threads, the answer being that it doesn't :-) This patch is a net loss of about 200 lines of code. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_super.c')
-rw-r--r--fs/gfs2/ops_super.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c
index ad36af254fee..29f8a5c0b45b 100644
--- a/fs/gfs2/ops_super.c
+++ b/fs/gfs2/ops_super.c
@@ -142,8 +142,6 @@ static void gfs2_put_super(struct super_block *sb)
142 kthread_stop(sdp->sd_quotad_process); 142 kthread_stop(sdp->sd_quotad_process);
143 kthread_stop(sdp->sd_logd_process); 143 kthread_stop(sdp->sd_logd_process);
144 kthread_stop(sdp->sd_recoverd_process); 144 kthread_stop(sdp->sd_recoverd_process);
145 while (sdp->sd_glockd_num--)
146 kthread_stop(sdp->sd_glockd_process[sdp->sd_glockd_num]);
147 145
148 if (!(sb->s_flags & MS_RDONLY)) { 146 if (!(sb->s_flags & MS_RDONLY)) {
149 error = gfs2_make_fs_ro(sdp); 147 error = gfs2_make_fs_ro(sdp);
@@ -369,7 +367,6 @@ static void gfs2_clear_inode(struct inode *inode)
369 */ 367 */
370 if (test_bit(GIF_USER, &ip->i_flags)) { 368 if (test_bit(GIF_USER, &ip->i_flags)) {
371 ip->i_gl->gl_object = NULL; 369 ip->i_gl->gl_object = NULL;
372 gfs2_glock_schedule_for_reclaim(ip->i_gl);
373 gfs2_glock_put(ip->i_gl); 370 gfs2_glock_put(ip->i_gl);
374 ip->i_gl = NULL; 371 ip->i_gl = NULL;
375 if (ip->i_iopen_gh.gh_gl) { 372 if (ip->i_iopen_gh.gh_gl) {
@@ -422,8 +419,6 @@ static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt)
422 seq_printf(s, ",debug"); 419 seq_printf(s, ",debug");
423 if (args->ar_upgrade) 420 if (args->ar_upgrade)
424 seq_printf(s, ",upgrade"); 421 seq_printf(s, ",upgrade");
425 if (args->ar_num_glockd != GFS2_GLOCKD_DEFAULT)
426 seq_printf(s, ",num_glockd=%u", args->ar_num_glockd);
427 if (args->ar_posix_acl) 422 if (args->ar_posix_acl)
428 seq_printf(s, ",acl"); 423 seq_printf(s, ",acl");
429 if (args->ar_quota != GFS2_QUOTA_DEFAULT) { 424 if (args->ar_quota != GFS2_QUOTA_DEFAULT) {