public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: "Ionut Nechita (Wind River)" <ionut.nechita@windriver.com>
Cc: axboe@kernel.dk, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, bigeasy@linutronix.de
Subject: Re: [PATCH v2 0/1] block/blk-mq: fix RT kernel regression with dedicated quiesce_sync_lock
Date: Wed, 11 Feb 2026 08:18:49 +0800	[thread overview]
Message-ID: <20260211001851.2821-1-hdanton@sina.com> (raw)
In-Reply-To: <20260210204943.21709-3-ionut.nechita@windriver.com>

On Tue, 10 Feb 2026 22:49:44 +0200 Ionut Nechita (Wind River) wrote:
> 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.
> 
> Test results on RT kernel (megaraid_sas with 8 MSI-X vectors):
> - Before: 153 MB/s, 6-8 IRQ threads in D-state
> - After:  640 MB/s, 0 IRQ threads blocked
>
Because the top waiter is allowed to spin on rtmutex owner, the D-state
irq threads are expected.
OTOH raw spinlock offers nothing for top waiter, which is the extra price
for resuming the throughput.

      parent reply	other threads:[~2026-02-11  0:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Hillf Danton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260211001851.2821-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=axboe@kernel.dk \
    --cc=bigeasy@linutronix.de \
    --cc=ionut.nechita@windriver.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox