diff options
author | Theodore Ts'o <tytso@mit.edu> | 2008-10-09 23:53:47 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-10-09 23:53:47 -0400 |
commit | 240799cdf22bd789ea6852653c3b879d35ad0a6c (patch) | |
tree | e696b60cc103f23838b5c14d8d397f692abffbc3 /fs/ext4/ext4.h | |
parent | 37515facd001942221d68171c81c1f46d54ffdd0 (diff) |
ext4: Use readahead when reading an inode from the inode table
With modern hard drives, reading 64k takes roughly the same time as
reading a 4k block. So request readahead for adjacent inode table
blocks to reduce the time it takes when iterating over directories
(especially when doing this in htree sort order) in a cold cache case.
With this patch, the time it takes to run "git status" on a kernel
tree after flushing the caches via "echo 3 > /proc/sys/vm/drop_caches"
is reduced by 21%.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 163c44527dde..922d18720c9e 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -790,6 +790,8 @@ static inline int ext4_valid_inum(struct super_block *sb, unsigned long ino) | |||
790 | #define EXT4_DEF_RESUID 0 | 790 | #define EXT4_DEF_RESUID 0 |
791 | #define EXT4_DEF_RESGID 0 | 791 | #define EXT4_DEF_RESGID 0 |
792 | 792 | ||
793 | #define EXT4_DEF_INODE_READAHEAD_BLKS 32 | ||
794 | |||
793 | /* | 795 | /* |
794 | * Default mount options | 796 | * Default mount options |
795 | */ | 797 | */ |