diff options
author | Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> | 2013-07-04 13:04:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-04 14:22:46 -0400 |
commit | 275f495dbe34300d793466a7d96c70f83fbae1bc (patch) | |
tree | 75785e0623188c52360f845419354b3b7cd67051 /fs/hpfs/hpfs_fn.h | |
parent | a0c1b7596323a2323d5f5c7d2404af7b58a1ef4e (diff) |
hpfs: implement prefetch to improve performance
This patch implements prefetch to improve performance. It helps mostly
when scanning the bitmaps to calculate free space.
Signed-off-by: Mikulas Patocka <mpatocka@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hpfs/hpfs_fn.h')
-rw-r--r-- | fs/hpfs/hpfs_fn.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h index b7ae286646b5..1b398636e990 100644 --- a/fs/hpfs/hpfs_fn.h +++ b/fs/hpfs/hpfs_fn.h | |||
@@ -27,8 +27,9 @@ | |||
27 | #define ALLOC_FWD_MAX 128 | 27 | #define ALLOC_FWD_MAX 128 |
28 | #define ALLOC_M 1 | 28 | #define ALLOC_M 1 |
29 | #define FNODE_RD_AHEAD 16 | 29 | #define FNODE_RD_AHEAD 16 |
30 | #define ANODE_RD_AHEAD 16 | 30 | #define ANODE_RD_AHEAD 0 |
31 | #define DNODE_RD_AHEAD 4 | 31 | #define DNODE_RD_AHEAD 72 |
32 | #define COUNT_RD_AHEAD 62 | ||
32 | 33 | ||
33 | #define FREE_DNODES_ADD 58 | 34 | #define FREE_DNODES_ADD 58 |
34 | #define FREE_DNODES_DEL 29 | 35 | #define FREE_DNODES_DEL 29 |
@@ -207,6 +208,7 @@ void hpfs_remove_fnode(struct super_block *, fnode_secno fno); | |||
207 | 208 | ||
208 | /* buffer.c */ | 209 | /* buffer.c */ |
209 | 210 | ||
211 | void hpfs_prefetch_sectors(struct super_block *, unsigned, int); | ||
210 | void *hpfs_map_sector(struct super_block *, unsigned, struct buffer_head **, int); | 212 | void *hpfs_map_sector(struct super_block *, unsigned, struct buffer_head **, int); |
211 | void *hpfs_get_sector(struct super_block *, unsigned, struct buffer_head **); | 213 | void *hpfs_get_sector(struct super_block *, unsigned, struct buffer_head **); |
212 | void *hpfs_map_4sectors(struct super_block *, unsigned, struct quad_buffer_head *, int); | 214 | void *hpfs_map_4sectors(struct super_block *, unsigned, struct quad_buffer_head *, int); |
@@ -271,6 +273,7 @@ void hpfs_evict_inode(struct inode *); | |||
271 | 273 | ||
272 | __le32 *hpfs_map_dnode_bitmap(struct super_block *, struct quad_buffer_head *); | 274 | __le32 *hpfs_map_dnode_bitmap(struct super_block *, struct quad_buffer_head *); |
273 | __le32 *hpfs_map_bitmap(struct super_block *, unsigned, struct quad_buffer_head *, char *); | 275 | __le32 *hpfs_map_bitmap(struct super_block *, unsigned, struct quad_buffer_head *, char *); |
276 | void hpfs_prefetch_bitmap(struct super_block *, unsigned); | ||
274 | unsigned char *hpfs_load_code_page(struct super_block *, secno); | 277 | unsigned char *hpfs_load_code_page(struct super_block *, secno); |
275 | __le32 *hpfs_load_bitmap_directory(struct super_block *, secno bmp); | 278 | __le32 *hpfs_load_bitmap_directory(struct super_block *, secno bmp); |
276 | struct fnode *hpfs_map_fnode(struct super_block *s, ino_t, struct buffer_head **); | 279 | struct fnode *hpfs_map_fnode(struct super_block *s, ino_t, struct buffer_head **); |