remarkable-linux/fs/ext4
Theodore Ts'o 75507efb13 ext4: Don't avoid using BLOCK_UNINIT block groups in mballoc
By avoiding the use of not-yet-used block groups (i.e., block groups
with the BLOCK_UNINIT flag), mballoc had a tendency to create large
files with large non-contiguous gaps.  In addition avoiding the use of
new block groups had a tendency to push regular file data into the
first block group in a flex_bg group, which slows down the speed of
e2fsck pass 2, since it has a tendency to seek much more.  For
example:

               Before Patch                       After Patch
              Time in seconds                   Time in seconds
            Real /  User/  Sys   MB/s      Real /  User/  Sys    MB/s
Pass 1      8.52 / 2.21 / 0.46  20.43      8.84 / 4.97 / 1.11   19.68
Pass 2     21.16 / 1.02 / 1.86  11.30      6.54 / 1.77 / 1.78   36.39
Pass 3      0.01 / 0.00 / 0.00 139.00      0.01 / 0.01 / 0.00  128.90
Pass 4      0.16 / 0.15 / 0.00   0.00      0.17 / 0.17 / 0.00    0.00
Pass 5      2.52 / 1.99 / 0.09   0.79      2.31 / 1.78 / 0.06    0.86
Total      32.40 / 5.11 / 2.49  12.81     17.99 / 8.75 / 2.98   23.01

This was on a sample 80 gig root filesystem which was approximately
50% full.  Note the improved e2fsck pass 2 performance, by over a
factor of 3, due to a decreased number of seeks.  (The total amount of
I/O in pass 2 was unchanged; the layout of the directory blocks was
simply much better from e2fsck's's perspective.)

Other changes as a result of this patch on this sample filesystem:

                             Before Patch    After Patch
# of non-contig files           762             779
# of non-contig directories     571             570
# of BLOCK_UNINIT bg's          307             293
# of INODE_UNINIT bg's          503             503

Out of 640 block groups, of which 333 were in use, this patch caused
an extra 14 block groups to be utilized.  The number of non-contiguous
files did go up slightly, but when measured against the 99.9% of the
files (603,154) which were contiguously allocated, this is pretty
insignificant.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Andreas Dilger <adilger@sun.com>
2009-05-01 12:58:36 -04:00
..
acl.c New helper - current_umask() 2009-03-31 23:00:26 -04:00
acl.h ext4: Rename ext4dev to ext4 2008-10-10 20:02:48 -04:00
balloc.c ext4: Avoid races caused by on-line resizing and SMP memory reordering 2009-05-01 08:50:38 -04:00
bitmap.c ext4: Change unsigned long to unsigned int 2008-11-05 00:14:04 -05:00
dir.c ext4: New rec_len encoding for very large blocksizes 2009-02-14 23:01:36 -05:00
ext4.h ext4: Avoid races caused by on-line resizing and SMP memory reordering 2009-05-01 08:50:38 -04:00
ext4_extents.h ext4: Validate extent details only when read from the disk 2009-03-27 16:39:58 -04:00
ext4_i.h ext4: New inode/block allocation algorithms for flex_bg filesystems 2009-03-12 12:18:34 -04:00
ext4_jbd2.c ext4: Allow ext4 to run without a journal 2009-01-07 00:06:22 -05:00
ext4_jbd2.h ext4: Remove "extents" mount option 2009-01-06 14:53:16 -05:00
ext4_sb.h ext4: Replace lock/unlock_super() with an explicit lock for the orphan list 2009-04-25 22:54:04 -04:00
extents.c ext4: Mark the unwritten buffer_head as mapped during write_begin 2009-05-12 16:30:27 -04:00
file.c ext4: Fix discard of inode prealloc space with delayed allocation. 2009-03-27 22:36:43 -04:00
fsync.c ext4: Add debugging markers that can be used by systemtap 2008-10-05 20:50:06 -04:00
group.h
hash.c ext4: Add support for non-native signed/unsigned htree hash algorithms 2008-10-28 13:21:44 -04:00
ialloc.c ext4: Avoid races caused by on-line resizing and SMP memory reordering 2009-05-01 08:50:38 -04:00
inode.c ext4: Avoid races caused by on-line resizing and SMP memory reordering 2009-05-01 08:50:38 -04:00
ioctl.c ext4: add EXT4_IOC_ALLOC_DA_BLKS ioctl 2009-02-26 01:04:07 -05:00
Kconfig trivial: fix typos/grammar errors in Kconfig texts 2009-03-30 15:22:01 +02:00
Makefile ext4: Rename ext4dev to ext4 2008-10-10 20:02:48 -04:00
mballoc.c ext4: Don't avoid using BLOCK_UNINIT block groups in mballoc 2009-05-01 12:58:36 -04:00
mballoc.h ext4: Rename pa_linear to pa_type 2009-03-27 17:16:58 -04:00
migrate.c ext4: Fix NULL dereference in ext4_ext_migrate()'s error handling 2009-02-15 20:02:19 -05:00
namei.c ext4: Replace lock/unlock_super() with an explicit lock for the orphan list 2009-04-25 22:54:04 -04:00
namei.h
resize.c ext4: Replace lock/unlock_super() with an explicit lock for resizing 2009-04-25 22:53:39 -04:00
super.c ext4: Replace lock/unlock_super() with an explicit lock for the orphan list 2009-04-25 22:54:04 -04:00
symlink.c ext4: Rename ext4dev to ext4 2008-10-10 20:02:48 -04:00
xattr.c ext4: Use lowercase names of quota functions 2009-03-26 02:18:36 +01:00
xattr.h ext4: Rename ext4dev to ext4 2008-10-10 20:02:48 -04:00
xattr_security.c
xattr_trusted.c
xattr_user.c