Re: [PATCH v3 1/1] block/blk-mq: use atomic_t for quiesce_depth to avoid lock contention on RT

From: Hillf Danton

Date: Thu Feb 12 2026 - 08:27:54 EST


On Thu, 12 Feb 2026 09:14:18 +0200 Ionut Nechita (Wind River) wrote:
>
> PREEMPT_RT has been merged into mainline since v6.12. There is no
> separate RT tree for this kind of fix anymore. The spinlock in question

https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/

> converts to rt_mutex under PREEMPT_RT, which is now a mainline
> configuration option, so the contention issue is a mainline problem.
>
CONFIG_PREEMPT_RT can not be found in your patch.

> Beyond the RT aspect, replacing the spinlock with atomic_t in the hot
> path is arguably a simplification that benefits all configurations -
> it removes locking overhead and eliminates the two-variable
> synchronization (quiesce_depth + QUEUE_FLAG_QUIESCED) in favor of a
> single atomic counter.
>
Then it was not wise to add the spinlock, yes?