Ionut Nechita ee4ad3b25d kernel: add patch to fix RT kernel regression in block layer
Add patch 0017 for kernel-rt to fix severe performance regression
in RT kernel's block multi-queue layer.

In RT kernel (PREEMPT_RT), commit 6bda857bcbb86 ("block: fix ordering
between checking QUEUE_FLAG_QUIESCED request adding") introduced
spinlock_t queue_lock usage in blk_mq_run_hw_queue(). While this works
correctly in standard kernel, it causes catastrophic serialization in
RT kernel where spinlock_t converts to sleeping rt_mutex.

The issue occurs when multiple MSI-X interrupt vectors contend on
queue_lock in blk_mq_run_hw_queue(), causing IRQ threads to serialize
and enter D-state.

The patch converts quiesce_depth to atomic_t and uses it directly for
quiesce state checking, eliminating QUEUE_FLAG_QUIESCED entirely. This
removes the need for any locking in the hot path.

Tested on MegaRAID 12GSAS with 128 MSI-X vectors (120 hw queues):
- Before: 153 MB/s, IRQ threads in D-state
- After:  640 MB/s, no IRQ threads blocked

Verification:
- Build kernel and out of tree modules success for rt and std.
- Build iso success for rt and std.
- Install success onto a All-in-One lab with std kernel, and can
  switch to rt kernel.
- Boot up successfully in the lab.
- The sanity testing was run and the test results PASS.

Story: 2011644
Task: 53580
Closes-Bug: 2139132

Change-Id: Ida9e378127637dc4abb0737846405b740c9913b8
Signed-off-by: Ionut Nechita <ionut.nechita@windriver.com>
2026-02-25 11:50:49 -05:00
2023-08-31 01:36:50 +00:00
2023-04-28 12:38:51 -04:00
2024-03-01 19:24:03 -03:00
Description
StarlingX Linux kernel
13 MiB
Languages
Python 46.8%
Shell 26.5%
Makefile 23.9%
POV-Ray SDL 1.7%
Perl 1.1%