public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3 0/1]  xfs: soft lockups in unmapping and reflink remapping path
@ 2024-05-07  5:13 Ritesh Harjani (IBM)
  2024-05-07  5:13 ` [PATCHv3 1/1] xfs: Add cond_resched to xfs_defer_finish_noroll Ritesh Harjani (IBM)
  0 siblings, 1 reply; 3+ messages in thread
From: Ritesh Harjani (IBM) @ 2024-05-07  5:13 UTC (permalink / raw)
  To: linux-xfs
  Cc: Dave Chinner, Darrick J . Wong, Christoph Hellwig, Ojaswin Mujoo,
	Ritesh Harjani

Hello,

In one of the testcases, parallel async dio writes to a file generates
large no. of extents (upto 2M or more), and then this file is cleaned up for
running other I/O tests. In the process of deleting this file, soft lockup
messages are observed. We believe this is happening due to kernel being busy
in unmapping/freeing those extents as part of the transaction processing.
This is similar observation with the same call stack which was also reported
here [1]. I also tried the qemu-img bench testcase shared in [1], and I was
able to reproduce the soft lockup with that on Power.

Similarly another instance was reported where xfs reflink remapping path also
saw a similar softlockup problem while iterating over deferrd work items
in xfs_trans_commit() -> xfs_defer_finish_noroll().

So as I understood from that discussion [1], that kernel is moving towards a new
preemption model, but IIUC, it is still an ongoing work.
Also IMHO, this is still a problem in upstream and in older stable kernels
which we still do support and such a fix might still be necessary for them.

This patch fixes the softlockup warning for both of the callstacks.

v2 -> v3:
Move cond_resched within xfs_defer_finish_noroll() loop

[v2]: https://lore.kernel.org/linux-xfs/cover.1714033516.git.ritesh.list@gmail.com/

Ritesh Harjani (IBM) (1):
  xfs: Add cond_resched to xfs_defer_finish_noroll

 fs/xfs/libxfs/xfs_defer.c | 1 +
 1 file changed, 1 insertion(+)

--
2.44.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-07  6:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-07  5:13 [PATCHv3 0/1] xfs: soft lockups in unmapping and reflink remapping path Ritesh Harjani (IBM)
2024-05-07  5:13 ` [PATCHv3 1/1] xfs: Add cond_resched to xfs_defer_finish_noroll Ritesh Harjani (IBM)
2024-05-07  6:06   ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox