Re: [PATCH 0/2] Add cond_resched() in some place to avoid softlockup

From: Dave Chinner

Date: Fri Feb 13 2026 - 16:39:46 EST


On Thu, Feb 05, 2026 at 04:26:19PM +0800, alexjlzheng@xxxxxxxxx wrote:
> From: Jinliang Zheng <alexjlzheng@xxxxxxxxxxx>
>
> We recently observed several XFS-related softlockups in non-preempt
> kernels during stability testing, and we believe adding a few
> cond_resched()calls would be beneficial.
>
> Jinliang Zheng (2):
> xfs: take a breath in xlog_ioend_work()
> xfs: take a breath in xfsaild()
>
> fs/xfs/xfs_buf.c | 2 ++
> fs/xfs/xfs_log_cil.c | 3 +++
> 2 files changed, 5 insertions(+)

To follow up on my comments about cond_resched(), commit
7dadeaa6e851 ("sched: Further restrict the preemption modes") was
just merged into 7.0. This means the only two supported preempt
modes for all the main architectures are PREEMPT_FULL and
PREEMPT_LAZY.

i.e. PREEMPT_NONE and PREEMPT_VOLUNTARY are essentially gone and
only remain on fringe architectures that do not support preemption
or have not yet been fully ported to support preemption.

Hence we should be starting to consider the removal all the
cond_resched() points we have in the code, not adding more...

-Dave.
--
Dave Chinner
dgc@xxxxxxxxxx