Re: [Regression] ext4: changes to mb_optimize_scan cause issues on Raspberry Pi

From: Stefan Wahren
Date: Sun Jul 24 2022 - 17:43:59 EST


Am 18.07.22 um 15:29 schrieb Stefan Wahren:
Hi,

i noticed that since Linux 5.18 (Linux 5.19-rc6 is still affected) i'm unable to run "rpi-update" without massive performance regression on my Raspberry Pi 4 (multi_v7_defconfig + CONFIG_ARM_LPAE). Using Linux 5.17 this tool successfully downloads the latest firmware (> 100 MB) on my development micro SD card (Kingston 16 GB Industrial) with a ext4 filesystem within ~ 1 min. The same scenario on Linux 5.18 shows the following symptoms:

FWIW, here some information about the affected ext4 partition:

fc stats:
0 commits
0 ineligible
0 numblks
0us avg_commit_time
Ineligible reasons:
"Extended attributes changed":    0
"Cross rename":    0
"Journal flag changed":    0
"Insufficient memory":    0
"Swap boot":    0
"Resize":    0
"Dir renamed":    0
"Falloc range op":    0
"Data journalling":    0

options:
rw
bsddf
nogrpid
block_validity
dioread_nolock
nodiscard
delalloc
nowarn_on_error
nojournal_checksum
barrier
auto_da_alloc
user_xattr
noquota
resuid=0
resgid=0
errors=continue
commit=5
min_batch_time=0
max_batch_time=15000
stripe=0
data=ordered
inode_readahead_blks=32
init_itable=10
max_dir_size_kb=0

tune2fs 1.44.5 (15-Dec-2018)
Filesystem volume name:   rootfs
Last mounted on:          /
Filesystem UUID:          3857a514-b0f4-49ce-8430-34762068bb6f
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file dir_nlink extra_isize
Filesystem flags:         unsigned_directory_hash
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              927360
Block count:              3755008
Reserved block count:     158603
Free blocks:              1770208
Free inodes:              731074
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      220
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8064
Inode blocks per group:   504
Flex block group size:    16
Filesystem created:       Fri Mar  5 00:10:14 2021
Last mount time:          Sun Jul 24 22:47:19 2022
Last write time:          Sun Jul 24 22:47:18 2022
Mount count:              4
Maximum mount count:      -1
Last checked:             Tue Jul 19 09:16:29 2022
Check interval:           0 (<none>)
Lifetime writes:          25 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:              256
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      4f95e9ae-24e1-4c7f-bb32-f4a9c41649a7
Journal backup:           inode blocks