diff mbox series

block/027: setup scsi_debug with MQ

Message ID 20241022064109.3303704-1-ming.lei@redhat.com (mailing list archive)
State New, archived
Headers show
Series block/027: setup scsi_debug with MQ | expand

Commit Message

Ming Lei Oct. 22, 2024, 6:41 a.m. UTC
block/027 focuses on race condition between blkg association and
request_queue shutdown. Unfortunately it is a bit easy to trigger
lockup by setting scsi_debug in the following way:

- single queue
- 21 LUNs
- small queue depth(110)
- 10us completion delay
- fio: 4 jobs, with iodepth 2048

The above setting creates big contention on tag allocation of blk-mq
code path, especially scsi_debug takes memcpy to simulate IO, which
doesn't match device in reality.

So setup scsi_debug with MQ and avoid to trigger lockup which doesn't
exist in real storage device usually.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
 tests/block/027 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chaitanya Kulkarni Oct. 23, 2024, 5:26 a.m. UTC | #1
On 10/21/24 23:41, Ming Lei wrote:
> block/027 focuses on race condition between blkg association and
> request_queue shutdown. Unfortunately it is a bit easy to trigger
> lockup by setting scsi_debug in the following way:
>
> - single queue
> - 21 LUNs
> - small queue depth(110)
> - 10us completion delay
> - fio: 4 jobs, with iodepth 2048
>
> The above setting creates big contention on tag allocation of blk-mq
> code path, especially scsi_debug takes memcpy to simulate IO, which
> doesn't match device in reality.
>
> So setup scsi_debug with MQ and avoid to trigger lockup which doesn't
> exist in real storage device usually.
>
> Signed-off-by: Ming Lei<ming.lei@redhat.com>

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck
Shinichiro Kawasaki Oct. 25, 2024, 4:48 a.m. UTC | #2
On Oct 22, 2024 / 14:41, Ming Lei wrote:
> block/027 focuses on race condition between blkg association and
> request_queue shutdown. Unfortunately it is a bit easy to trigger
> lockup by setting scsi_debug in the following way:
> 
> - single queue
> - 21 LUNs
> - small queue depth(110)
> - 10us completion delay
> - fio: 4 jobs, with iodepth 2048
> 
> The above setting creates big contention on tag allocation of blk-mq
> code path, especially scsi_debug takes memcpy to simulate IO, which
> doesn't match device in reality.
> 
> So setup scsi_debug with MQ and avoid to trigger lockup which doesn't
> exist in real storage device usually.
> 
> Signed-off-by: Ming Lei <ming.lei@redhat.com>

I applied it along with a shellcheck warning fix. Thanks!
diff mbox series

Patch

diff --git a/tests/block/027 b/tests/block/027
index a79a115..cf4ff16 100755
--- a/tests/block/027
+++ b/tests/block/027
@@ -84,7 +84,7 @@  test() {
 	echo "Running ${TEST_NAME}"
 
 	scsi_debug_stress_remove virtual_gb=128 max_luns=21 ndelay=10000 \
-		max_queue=110
+		max_queue=110 submit_queues=$(nproc)
 
 	echo "Test complete"
 }