diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2012-06-07 08:30:16 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2012-06-07 08:30:16 -0400 |
commit | df5d2f5560a9c33129391a136ed9f0ac26abe69b (patch) | |
tree | 856a81be21fad102bc3fe6cbaeb5af5eeb8b21c6 /fs/gfs2 | |
parent | 1b8ba31a88c5115687095ca2a01bfcaecb489b5a (diff) |
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 <viro@ZenIV.linux.org.uk>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/glock.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index dab2526071cc..1c4cddf42a66 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) | |||
1972 | struct seq_file *seq = file->private_data; | 1972 | struct seq_file *seq = file->private_data; |
1973 | struct gfs2_glock_iter *gi = seq->private; | 1973 | struct gfs2_glock_iter *gi = seq->private; |
1974 | gi->sdp = inode->i_private; | 1974 | gi->sdp = inode->i_private; |
1975 | seq->buf = kmalloc(8*PAGE_SIZE, GFP_KERNEL | __GFP_NOWARN); | ||
1976 | if (seq->buf) | ||
1977 | seq->size = 8*PAGE_SIZE; | ||
1975 | } | 1978 | } |
1976 | return ret; | 1979 | return ret; |
1977 | } | 1980 | } |
@@ -1984,6 +1987,9 @@ static int gfs2_glstats_open(struct inode *inode, struct file *file) | |||
1984 | struct seq_file *seq = file->private_data; | 1987 | struct seq_file *seq = file->private_data; |
1985 | struct gfs2_glock_iter *gi = seq->private; | 1988 | struct gfs2_glock_iter *gi = seq->private; |
1986 | gi->sdp = inode->i_private; | 1989 | gi->sdp = inode->i_private; |
1990 | seq->buf = kmalloc(8*PAGE_SIZE, GFP_KERNEL | __GFP_NOWARN); | ||
1991 | if (seq->buf) | ||
1992 | seq->size = 8*PAGE_SIZE; | ||
1987 | } | 1993 | } |
1988 | return ret; | 1994 | return ret; |
1989 | } | 1995 | } |