Bug 216430 - mdtest may pause for 5-10 mins on ext4
Summary: mdtest may pause for 5-10 mins on ext4
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: ext4 (show other bugs)
Hardware: AMD Linux
: P1 blocking
Assignee: fs_ext4@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-31 10:09 UTC by JunChao Sun
Modified: 2022-09-01 08:49 UTC (History)
2 users (show)

See Also:
Kernel Version: 5.10
Subsystem:
Regression: No
Bisected commit-id:


Attachments
mdtest may pause for 5-10 mins on ext4 (7.55 KB, text/plain)
2022-08-31 10:09 UTC, JunChao Sun
Details

Description JunChao Sun 2022-08-31 10:09:11 UTC
Created attachment 301705 [details]
mdtest may pause for 5-10 mins on ext4

Hi, all. Recenlty we ran mdtest on ext4, and observed a wired phenomenon:

After ran some mdtest cases, mdtest will pause for 5-10mins, this impacts performance of ext4 severely. And we can not repro this on xfs.

Some information about machine:

[root@client2 mnt_ramdisk2]# lscpu 
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                128
On-line CPU(s) list:   0-127
Thread(s) per core:    2
Core(s) per socket:    32
Socket(s):             2
NUMA node(s):          2
Vendor ID:             AuthenticAMD
CPU family:            25
Model:                 1
Model name:            AMD EPYC 7543 32-Core Processor
Stepping:              1
CPU MHz:               1799.746
CPU max MHz:           3737.8899
CPU min MHz:           1500.0000
BogoMIPS:              5599.80
Virtualization:        AMD-V
L1d cache:             32K
L1i cache:             32K
L2 cache:              512K
L3 cache:              32768K
NUMA node0 CPU(s):     0-31,64-95
NUMA node1 CPU(s):     32-63,96-127
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 invpcid_single hw_pstate sme ssbd mba sev ibrs ibpb stibp vmmcall sev_es fsgsbase bmi1 avx2 smep bmi2 invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload vgif umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca

[root@client2 ~]# uname  -r
5.10.139-default

We could also reproduced with 5.3.18 and 5.15.

We could reproduced this by running:
modprobe brd rd_nr=1 rd_size=167772160 max_part=0
/opt/tools/e2fsprogs/mkfs.ext4 -i 2048 -I 1024 -J size=20000 -Odir_index,large_dir,filetype /dev/ram0
echo `blkid /dev/ram0 |awk '{print $2}'` /mnt_ramdisk3 ext4 defaults,noatime,nodiratime,user_xattr,nofail,x-systemd.device-timeout=5 0 0 >> /etc/fstab

mount -a
for ((i=1;i<=100;i++)) ; do  (time  /usr/local/bin/mdtest -R -C -L -F -u -z 10 -b 2 -I 1000 -u -d /mnt_ramdisk3/mdtest-$RANDOM) 2>&1 |grep -E " at |real"  ; done

which mnt_ramdisk3 is mounted a ext4 file system with ram or nvme disk. This problem occured one time per 100 mdtest cases almostly. The test result is attched.


Any thoughts or hints about this? Let me known if any information is required. Thanks!

Kind regards,
JunChao
Comment 1 JunChao Sun 2022-08-31 10:15:10 UTC
Memory info abouht machine:
[root@client2 ~]# free -g
              total        used        free      shared  buff/cache   available
Mem:            251           3         244           0           3         246
Swap:             0           0           0
Comment 2 The Linux kernel's regression tracker (Thorsten Leemhuis) 2022-09-01 08:47:29 UTC
(In reply to JunChao Sun from comment #0)

> Any thoughts or hints about this? Let me known if any information is
> required. Thanks!

So earlier 5.10.y versions worked? Which was the latest one that worked? Ideally  you would use "git bisect" to find the exact change made this problem appear.
Comment 3 The Linux kernel's regression tracker (Thorsten Leemhuis) 2022-09-01 08:49:07 UTC
btw, a "dmesg" output right after the problem appeared would likely be helpful

Note You need to log in before you can comment on or make changes to this bug.