From df5d2f5560a9c33129391a136ed9f0ac26abe69b Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Thu, 7 Jun 2012 13:30:16 +0100 Subject: GFS2: Increase buffer size for glocks and glstats debugfs files As per Al Viro's suggestion, this increases the buffer size used for these two files. This provides a speed up of slightly less than 8x (i.e. proportional to the buffer size) for cases when we have large numbers of glocks. Cc: Al Viro Signed-off-by: Steven Whitehouse --- fs/gfs2/glock.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fs') diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index dab2526071c..1c4cddf42a6 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1972,6 +1972,9 @@ static int gfs2_glocks_open(struct inode *inode, struct file *file) struct seq_file *seq = file->private_data; struct gfs2_glock_iter *gi = seq->private; gi->sdp = inode->i_private; + seq->buf = kmalloc(8*PAGE_SIZE, GFP_KERNEL | __GFP_NOWARN); + if (seq->buf) + seq->size = 8*PAGE_SIZE; } return ret; } @@ -1984,6 +1987,9 @@ static int gfs2_glstats_open(struct inode *inode, struct file *file) struct seq_file *seq = file->private_data; struct gfs2_glock_iter *gi = seq->private; gi->sdp = inode->i_private; + seq->buf = kmalloc(8*PAGE_SIZE, GFP_KERNEL | __GFP_NOWARN); + if (seq->buf) + seq->size = 8*PAGE_SIZE; } return ret; } -- cgit v1.2.3-18-g5258