Description of problem: Deleting a XFS file with lots of extents may cause a soft lockup if the preemption model is none(CONFIG_PREEMPT_NONE=y or preempt=none is set in the kernel cmdline). Alibaba cloud kernel and Oracle UEK container kernel are affected by the issue, since they select CONFIG_PREEMPT_NONE=y. https://lore.kernel.org/linux-xfs/20240110071347.3711925-1-wenjian1@xiaomi.com/T/#u Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. img=test.raw ; qemu-img create -f raw -o extent_size_hint=0 ${img} 10G && qemu-img bench -f raw -t none -n -w ${img} -c 1000000 -S 8192 -o 0 && filefrag ${img} 2. rm test.raw Actual results: watchdog: BUG: soft lockup - CPU#0 stuck for 23s! Call Trace: ... __xfs_free_extent+0x66/0x1d0 xfs_trans_free_extent+0xac/0x290 xfs_extent_free_finish_item+0xf/0x40 xfs_defer_finish_noroll+0x1db/0x7f0 xfs_defer_finish+0x10/0xa0 xfs_itruncate_extents_flags+0x169/0x4c0 Expected results: Additional info:
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/2980
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3335
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3348
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3349