public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] block/blk-mq: fix RT kernel regression with dedicated quiesce_sync_lock
@ 2026-02-10 20:49 Ionut Nechita (Wind River)
  2026-02-10 20:49 ` [PATCH v2 1/1] " Ionut Nechita (Wind River)
  2026-02-11  0:18 ` [PATCH v2 0/1] " Hillf Danton
  0 siblings, 2 replies; 6+ messages in thread
From: Ionut Nechita (Wind River) @ 2026-02-10 20:49 UTC (permalink / raw)
  To: axboe
  Cc: linux-block, linux-kernel, linux-rt-users, ming.lei, muchun.song,
	mkhalfella, sunlightlinux, chris.friesen, stable, ionut_n2001,
	bigeasy, ionut.nechita

Hi Jens,

This is v2 of the fix for the RT kernel performance regression caused by
commit 679b1874eba7 ("block: fix ordering between checking
QUEUE_FLAG_QUIESCED request adding").

Changes since v1 (RESEND, Jan 9):
- Rebased on top of axboe/for-7.0/block
- No code changes

The problem: on PREEMPT_RT kernels, the spinlock_t queue_lock added in
blk_mq_run_hw_queue() converts to a sleeping rt_mutex, causing all IRQ
threads (one per MSI-X vector) to serialize. On megaraid_sas with 8
MSI-X vectors, throughput drops from 640 MB/s to 153 MB/s.

The fix introduces a dedicated raw_spinlock_t quiesce_sync_lock that
does not convert to rt_mutex on RT kernels. The critical section is
provably short (only flag and counter checks), making raw_spinlock safe.

In past used memory barriers but was rejected due to barrier pairing
complexity across multiple call sites (as noted by Muchun Song).

Ionut Nechita (1):
  block/blk-mq: fix RT kernel regression with dedicated
    quiesce_sync_lock

 block/blk-core.c       |  1 +
 block/blk-mq.c         | 27 ++++++++++++++++-----------
 include/linux/blkdev.h |  6 ++++++
 3 files changed, 23 insertions(+), 11 deletions(-)

-- 
2.52.0


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

end of thread, other threads:[~2026-02-11 11:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10 20:49 [PATCH v2 0/1] block/blk-mq: fix RT kernel regression with dedicated quiesce_sync_lock Ionut Nechita (Wind River)
2026-02-10 20:49 ` [PATCH v2 1/1] " Ionut Nechita (Wind River)
2026-02-10 21:39   ` Keith Busch
2026-02-11  7:28     ` Ionut Nechita (Wind River)
2026-02-11 11:31   ` Sebastian Andrzej Siewior
2026-02-11  0:18 ` [PATCH v2 0/1] " Hillf Danton

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