kernel_optimize_test/fs/ext4
brookxu 27bc446e2d ext4: limit the length of per-inode prealloc list
In the scenario of writing sparse files, the per-inode prealloc list may
be very long, resulting in high overhead for ext4_mb_use_preallocated().
To circumvent this problem, we limit the maximum length of per-inode
prealloc list to 512 and allow users to modify it.

After patching, we observed that the sys ratio of cpu has dropped, and
the system throughput has increased significantly. We created a process
to write the sparse file, and the running time of the process on the
fixed kernel was significantly reduced, as follows:

Running time on unfixed kernel:
[root@TENCENT64 ~]# time taskset 0x01 ./sparse /data1/sparce.dat
real    0m2.051s
user    0m0.008s
sys     0m2.026s

Running time on fixed kernel:
[root@TENCENT64 ~]# time taskset 0x01 ./sparse /data1/sparce.dat
real    0m0.471s
user    0m0.004s
sys     0m0.395s

Signed-off-by: Chunguang Xu <brookxu@tencent.com>
Link: https://lore.kernel.org/r/d7a98178-056b-6db5-6bce-4ead23f4a257@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2020-08-19 12:04:36 -04:00
..
acl.c ext4: handle ext4_mark_inode_dirty errors 2020-06-03 23:16:50 -04:00
acl.h
balloc.c ext4: indicate via a block bitmap read is prefetched via a tracepoint 2020-08-07 14:12:35 -04:00
bitmap.c
block_validity.c ext4: correctly restore system zone info when remount fails 2020-08-07 14:12:37 -04:00
dir.c ext4: avoid utf8_strncasecmp() with unstable name 2020-06-11 11:01:33 -04:00
ext4_extents.h ext4: fix EXT_MAX_EXTENT/INDEX to check for zeroed eh_max 2020-06-03 23:16:49 -04:00
ext4_jbd2.c ext4: abort the filesystem if failed to async write metadata buffer 2020-08-07 14:12:34 -04:00
ext4_jbd2.h ext4: drop ext4_journal_free_reserved() 2020-06-03 23:16:53 -04:00
ext4.h ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
extents_status.c ext4: remove unnecessary comparisons to bool 2020-06-03 23:16:49 -04:00
extents_status.h ext4: fix extent_status trace points 2020-01-25 02:03:03 -05:00
extents.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
file.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
fsmap.c ext4: fix miscellaneous sparse warnings 2019-05-12 04:49:47 -04:00
fsmap.h
fsync.c A lot of bug fixes and cleanups for ext4, including: 2020-06-05 16:19:28 -07:00
hash.c ext4: change to use fallthrough macro 2020-08-18 14:27:40 -04:00
ialloc.c This is the second round of ext4 commits for 5.8 merge window. It 2020-06-15 09:32:10 -07:00
indirect.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
inline.c ext4: Fix comment typo "the the". 2020-08-19 12:04:35 -04:00
inode-test.c kunit: allow kunit tests to be loaded as a module 2020-01-09 16:42:29 -07:00
inode.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
ioctl.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
Kconfig ext4: replace HTTP links with HTTPS ones 2020-08-06 01:01:57 -04:00
Makefile ext4: support xattr gnu.* namespace for the Hurd 2020-06-12 13:23:34 -04:00
mballoc.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
mballoc.h ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
migrate.c ext4: handle ext4_mark_inode_dirty errors 2020-06-03 23:16:50 -04:00
mmp.c ext4: save all error info in save_error_info() and drop ext4_set_errno() 2020-04-01 17:29:06 -04:00
move_extent.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
namei.c ext4: remove unused parameter of ext4_generic_delete_entry function 2020-08-18 14:25:54 -04:00
page-io.c fs/buffer: Make BH_Uptodate_Lock bit_spin_lock a regular spinlock_t 2020-03-28 13:21:08 +01:00
readpage.c ext4: change to use fallthrough macro 2020-08-18 14:27:40 -04:00
resize.c ext4: fix potential race between s_flex_groups online resizing and access 2020-02-21 19:31:46 -05:00
super.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
symlink.c
sysfs.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
truncate.h
verity.c This is the second round of ext4 commits for 5.8 merge window. It 2020-06-15 09:32:10 -07:00
xattr_hurd.c ext4: support xattr gnu.* namespace for the Hurd 2020-06-12 13:23:34 -04:00
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c ext4: delete unnecessary checks before brelse() 2020-08-06 00:08:56 -04:00
xattr.h ext4: support xattr gnu.* namespace for the Hurd 2020-06-12 13:23:34 -04:00