diff options
author | Andrew Morton <akpm@osdl.org> | 2006-03-23 03:00:11 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 07:38:09 -0800 |
commit | d8733c2956968a01394a4d2a9e97a8b431a78776 (patch) | |
tree | 9743c9020eb5193efa4a0f102b3a7eb1d999c4fd /mm/readahead.c | |
parent | b8e31edc10d160a8bf2159541d9d12f2079a0887 (diff) | |
download | kernel-common-d8733c2956968a01394a4d2a9e97a8b431a78776.tar.gz kernel-common-d8733c2956968a01394a4d2a9e97a8b431a78776.tar.bz2 kernel-common-d8733c2956968a01394a4d2a9e97a8b431a78776.zip |
[PATCH] ext3_readdir: use generic readahead
Linus points out that ext3_readdir's readahead only cuts in when
ext3_readdir() is operating at the very start of the directory. So for large
directories we end up performing no readahead at all and we suck.
So take it all out and use the core VM's page_cache_readahead(). This means
that ext3 directory reads will use all of readahead's dynamic sizing goop.
Note that we're using the directory's filp->f_ra to hold the readahead state,
but readahead is actually being performed against the underlying blockdev's
address_space. Fortunately the readahead code is all set up to handle this.
Tested with printk. It works. I was struggling to find a real workload which
actually cared.
(The patch also exports page_cache_readahead() to GPL modules)
Cc: "Stephen C. Tweedie" <sct@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/readahead.c')
-rw-r--r-- | mm/readahead.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/readahead.c b/mm/readahead.c index 301b36c4a0ce..0f142a40984b 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -555,6 +555,7 @@ recheck: out: return ra->prev_page + 1; } +EXPORT_SYMBOL_GPL(page_cache_readahead); /* * handle_ra_miss() is called when it is known that a page which should have |