diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2007-01-17 18:09:20 +0300 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2007-02-05 21:37:04 +0300 |
commit | 3699e3a44bf56e0cd58c97e8655f375ad9b65d9d (patch) | |
tree | 9ac31dd5b99373614f0cd52cc5a41536aeea271e /fs/gfs2/sys.c | |
parent | a8d638e30e768adc6956541f79f7bf05139ba475 (diff) | |
download | linux-3699e3a44bf56e0cd58c97e8655f375ad9b65d9d.tar.xz |
[GFS2] Clean up/speed up readdir
This removes the extra filldir callback which gfs2 was using to
enclose an attempt at readahead for inodes during readdir. The
code was too complicated and also hurts performance badly in the
case that the getdents64/readdir call isn't being followed by
stat() and it wasn't even getting it right all the time when it
was.
As a result, on my test box an "ls" of a directory containing 250000
files fell from about 7mins (freshly mounted, so nothing cached) to
between about 15 to 25 seconds. When the directory content was cached,
the time taken fell from about 3mins to about 4 or 5 seconds.
Interestingly in the cached case, running "ls -l" once reduced the time
taken for subsequent runs of "ls" to about 6 secs even without this
patch. Now it turns out that there was a special case of glocks being
used for prefetching the metadata, but because of the timeouts for these
locks (set to 10 secs) the metadata was being timed out before it was
being used and this the prefetch code was constantly trying to prefetch
the same data over and over.
Calling "ls -l" meant that the inodes were brought into memory and once
the inodes are cached, the glocks are not disposed of until the inodes
are pushed out of the cache, thus extending the lifetime of the glocks,
and thus bringing down the time for subsequent runs of "ls"
considerably.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/sys.c')
-rw-r--r-- | fs/gfs2/sys.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index 983eaf1e06be..cd28f08b244c 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c @@ -436,7 +436,6 @@ TUNE_ATTR(atime_quantum, 0); TUNE_ATTR(max_readahead, 0); TUNE_ATTR(complain_secs, 0); TUNE_ATTR(reclaim_limit, 0); -TUNE_ATTR(prefetch_secs, 0); TUNE_ATTR(statfs_slow, 0); TUNE_ATTR(new_files_jdata, 0); TUNE_ATTR(new_files_directio, 0); @@ -465,7 +464,6 @@ static struct attribute *tune_attrs[] = { &tune_attr_max_readahead.attr, &tune_attr_complain_secs.attr, &tune_attr_reclaim_limit.attr, - &tune_attr_prefetch_secs.attr, &tune_attr_statfs_slow.attr, &tune_attr_quota_simul_sync.attr, &tune_attr_quota_cache_secs.attr, |