linux-stable/fs/erofs
Gao Xiang 6422cde1b0 erofs: use buffered I/O for file-backed mounts by default
For many use cases (e.g. container images are just fetched from remote),
performance will be impacted if underlay page cache is up-to-date but
direct i/o flushes dirty pages first.

Instead, let's use buffered I/O by default to keep in sync with loop
devices and add a (re)mount option to explicitly give a try to use
direct I/O if supported by the underlying files.

The container startup time is improved as below:
[workload] docker.io/library/workpress:latest
                                     unpack        1st run  non-1st runs
EROFS snapshotter buffered I/O file  4.586404265s  0.308s   0.198s
EROFS snapshotter direct I/O file    4.581742849s  2.238s   0.222s
EROFS snapshotter loop               4.596023152s  0.346s   0.201s
Overlayfs snapshotter                5.382851037s  0.206s   0.214s

Fixes: fb17675026 ("erofs: add file-backed mount support")
Cc: Derek McGowan <derek@mcg.dev>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20241212134336.2059899-1-hsiangkao@linux.alibaba.com
2024-12-16 21:02:07 +08:00
..
compress.h erofs: avoid refcounting short-lived pages 2024-07-11 15:14:26 +08:00
data.c erofs: reference struct erofs_device_info for erofs_map_dev 2024-12-16 21:02:06 +08:00
decompressor_deflate.c erofs: tidy up stream decompressors 2024-07-09 19:04:41 +08:00
decompressor_lzma.c erofs: convert comma to semicolon 2024-07-26 18:48:12 +08:00
decompressor_zstd.c erofs: tidy up stream decompressors 2024-07-09 19:04:41 +08:00
decompressor.c erofs: fix error handling in z_erofs_init_decompressor 2024-09-10 00:46:34 +08:00
dir.c erofs: simplify readdir operation 2024-08-19 11:06:20 +08:00
erofs_fs.h erofs: restrict pcluster size limitations 2024-09-12 23:00:09 +08:00
fileio.c erofs: use buffered I/O for file-backed mounts by default 2024-12-16 21:02:07 +08:00
fscache.c erofs: reference struct erofs_device_info for erofs_map_dev 2024-12-16 21:02:06 +08:00
inode.c erofs: clarify direct I/O support 2024-11-18 18:50:14 +08:00
internal.h erofs: use buffered I/O for file-backed mounts by default 2024-12-16 21:02:07 +08:00
Kconfig erofs: mark experimental fscache backend deprecated 2024-09-10 15:27:11 +08:00
Makefile erofs: support unencoded inodes for fileio 2024-09-10 15:26:36 +08:00
namei.c erofs_buf: store address_space instead of inode 2024-04-25 00:57:14 -04:00
super.c erofs: use buffered I/O for file-backed mounts by default 2024-12-16 21:02:07 +08:00
sysfs.c erofs: add sysfs node to drop internal caches 2024-11-18 18:50:13 +08:00
xattr.c erofs_buf: store address_space instead of inode 2024-04-25 00:57:14 -04:00
xattr.h erofs: move erofs_xattr_handlers and xattr_handler_map to .rodata 2023-10-09 16:24:17 +02:00
zdata.c erofs: fix PSI memstall accounting 2024-12-13 00:24:40 +08:00
zmap.c erofs: handle NONHEAD !delta[1] lclusters gracefully 2024-11-18 18:50:14 +08:00
zutil.c erofs: fix rare pcluster memory leak after unmounting 2024-12-13 00:24:12 +08:00