diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2008-11-06 12:53:49 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-06 15:41:20 -0800 |
commit | d3dfa8228f87ab9960ab8b4718013d68e3c25a43 (patch) | |
tree | 236784875a5c735688e644fe8412649e5fdbfcd7 /fs/fat/fat.h | |
parent | 52e9d9f4b32a3bec91feb76c84e37b7dcffe5040 (diff) | |
download | op-kernel-dev-d3dfa8228f87ab9960ab8b4718013d68e3c25a43.zip op-kernel-dev-d3dfa8228f87ab9960ab8b4718013d68e3c25a43.tar.gz |
fat: improve fat_hash()
fat_hash() is using the algorithm known as bad. Instead of it, this
uses hash_32(). The following is the summary of test.
old hash:
hash func (1000 times): 33489 cycles
total inodes in hash table: 70926
largest bucket contains: 696
smallest bucket contains: 54
new hash:
hash func (1000 times): 33129 cycles
total inodes in hash table: 70926
largest bucket contains: 315
smallest bucket contains: 236
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fat/fat.h')
-rw-r--r-- | fs/fat/fat.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/fat/fat.h b/fs/fat/fat.h index a2a570f..2b8e94c 100644 --- a/fs/fat/fat.h +++ b/fs/fat/fat.h @@ -43,7 +43,6 @@ struct fat_mount_options { #define FAT_HASH_BITS 8 #define FAT_HASH_SIZE (1UL << FAT_HASH_BITS) -#define FAT_HASH_MASK (FAT_HASH_SIZE-1) /* * MS-DOS file system in-core superblock data |