Skip to content

Conversation

@blktests-ci
Copy link

@blktests-ci blktests-ci bot commented Dec 28, 2025

Pull request for series with
subject: block/blk-mq: fix RT kernel issues and interrupt context warnings
version: 2
url: https://patchwork.kernel.org/project/linux-block/list/?series=1035804

@blktests-ci
Copy link
Author

blktests-ci bot commented Dec 28, 2025

Upstream branch: d26143b
series: https://patchwork.kernel.org/project/linux-block/list/?series=1035804
version: 2

@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 4, 2026

Upstream branch: aacb0a6
series: https://patchwork.kernel.org/project/linux-block/list/?series=1035804
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1035804=>linus-master branch from 839fc61 to 46d87e9 Compare January 4, 2026 08:41
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 0ab4e8c to a2a6d78 Compare January 8, 2026 00:54
@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 8, 2026

Upstream branch: aacb0a6
series: https://patchwork.kernel.org/project/linux-block/list/?series=1035804
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1035804=>linus-master branch from 46d87e9 to 0493523 Compare January 8, 2026 00:57
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from a2a6d78 to f962a4d Compare January 9, 2026 04:56
@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 9, 2026

Upstream branch: 623fb99
series: https://patchwork.kernel.org/project/linux-block/list/?series=1035804
version: 2

Ionut Nechita added 2 commits January 9, 2026 14:01
Commit 679b1874eba7 ("block: fix ordering between checking
QUEUE_FLAG_QUIESCED request adding") introduced queue_lock acquisition
in blk_mq_run_hw_queue() to synchronize QUEUE_FLAG_QUIESCED checks.

On RT kernels (CONFIG_PREEMPT_RT), regular spinlocks are converted to
rt_mutex (sleeping locks). When multiple MSI-X IRQ threads process I/O
completions concurrently, they contend on queue_lock in the hot path,
causing all IRQ threads to enter D (uninterruptible sleep) state. This
serializes interrupt processing completely.

Test case (MegaRAID 12GSAS with 8 MSI-X vectors on RT kernel):
- Good (v6.6.52-rt):  640 MB/s sequential read
- Bad  (v6.6.64-rt):  153 MB/s sequential read (-76% regression)
- 6-8 out of 8 MSI-X IRQ threads stuck in D-state waiting on queue_lock

The original commit message mentioned memory barriers as an alternative
approach. Use full memory barriers (smp_mb) instead of queue_lock to
provide the same ordering guarantees without sleeping in RT kernel.

Memory barriers ensure proper synchronization:
- CPU0 either sees QUEUE_FLAG_QUIESCED cleared, OR
- CPU1 sees dispatch list/sw queue bitmap updates

This maintains correctness while avoiding lock contention that causes
RT kernel IRQ threads to sleep in the I/O completion path.

Fixes: 679b1874eba7 ("block: fix ordering between checking QUEUE_FLAG_QUIESCED request adding")
Cc: [email protected]
Signed-off-by: Ionut Nechita <[email protected]>
…context

Fix warning "WARN_ON_ONCE(!async && in_interrupt())" that occurs during
SCSI device scanning when blk_freeze_queue_start() calls blk_mq_run_hw_queues()
synchronously from interrupt context.

The issue happens during device removal/scanning when:
1. blk_mq_destroy_queue() -> blk_queue_start_drain()
2. blk_freeze_queue_start() calls blk_mq_run_hw_queues(q, false)
3. This triggers the warning in blk_mq_run_hw_queue() when in interrupt context

Change the synchronous call to asynchronous to avoid running in interrupt context.

Fixes: Warning in blk_mq_run_hw_queue+0x1fa/0x260
Signed-off-by: Ionut Nechita <[email protected]>
@blktests-ci blktests-ci bot force-pushed the series/1035804=>linus-master branch from 0493523 to 1402dc0 Compare January 9, 2026 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant