mirror of https://github.com/vitalif/e2fsprogs
a5abfe0382
e2fsck pass1 is modified to use the block group data prefetch function to try to fetch the inode tables into the pagecache before it is needed. We iterate through the blockgroups until we have enough inode tables that need reading such that we can issue readahead; then we sit and wait until the last inode table block read of the last group to start fetching the next bunch. pass2 is modified to use the dirblock prefetching function to prefetch the list of directory blocks that are assembled in pass1. We use the "iterate a subset of a dblist" and avoid copying the dblist. Directory blocks are fetched incrementally as we walk through the directory block list. In previous iterations of this patch we would free the directory blocks after processing, but the performance hit to e2fsck itself wasn't worth it. Furthermore, it is anticipated that most users will then mount the FS and start using the directories, so they may as well remain in the page cache. pass4 is modified to prefetch the block and inode bitmaps in anticipation of pass 5, because pass4 is entirely CPU bound. In general, these mechanisms can decrease fsck time by 10-40%, if the host system has sufficient memory and the storage system can provide a lot of IOPs. Pretty much any storage system capable of handling multiple IOs in-flight at any time will see a fairly large performance boost. (Single-issue USB mass storage disks seem to suffer badly.) By default, the readahead buffer size will be set to the size of a block group's inode table (which is 2MiB for a regular ext4 FS). The -E readahead_kb= option can be given to specify the amount of memory to use for readahead or zero to disable it entirely; or an option can be given in e2fsck.conf. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> |
||
---|---|---|
.. | ||
Android.mk | ||
CHANGES | ||
Makefile.in | ||
Makefile.pq | ||
argv_parse.c | ||
argv_parse.h | ||
badblocks.c | ||
dict.c | ||
dict.h | ||
dirinfo.c | ||
dx_dirinfo.c | ||
e2fsck.8.in | ||
e2fsck.c | ||
e2fsck.conf.5.in | ||
e2fsck.h | ||
ea_refcount.c | ||
ehandler.c | ||
emptydir.c | ||
extend.c | ||
flushb.c | ||
iscan.c | ||
jfs_user.h | ||
journal.c | ||
logfile.c | ||
message.c | ||
mtrace.awk | ||
mtrace.c | ||
mtrace.h | ||
pass1.c | ||
pass1b.c | ||
pass2.c | ||
pass3.c | ||
pass4.c | ||
pass5.c | ||
problem.c | ||
problem.h | ||
problemP.h | ||
prof_err.et | ||
profile.c | ||
profile.h | ||
profile_helpers.c | ||
profile_helpers.h | ||
quota.c | ||
readahead.c | ||
recovery.c | ||
region.c | ||
rehash.c | ||
revoke.c | ||
scantest.c | ||
sigcatcher.c | ||
super.c | ||
unix.c | ||
util.c |