Re: [PATCH] blk-mq: Avoid that I/O hangs in bt_get()

From: Bart Van Assche
Date: Thu Nov 06 2014 - 08:41:10 EST


On 10/07/14 10:46, Bart Van Assche wrote:
Thanks for looking into this. I can't reproduce the I/O lockup after
having reverted my patch and after having applied your patch. In the
test I ran fio was started with the following command-line options:

fio --bs=512 --ioengine=libaio --rw=randread --buffered=0 --numjobs=12
--iodepth=128 --iodepth_batch=64 --iodepth_batch_complete=64 --thread
--norandommap --loops=2147483648 --runtime=3600 --group_reporting
--gtod_reduce=1 --name=/dev/sdo --filename=/dev/sdo --invalidate=1

This job was run on a system with 12 CPU threads and against a SCSI
initiator driver for which the number of hardware contexts had been set
to 6. Queue depth per hardware queue was set to 127:
$ cat /sys/class/scsi_host/host10/can_queue
127

(replying to my own e-mail)

Hello Jens,

With kernel 3.18-rc3 and with can_queue=62 I can trigger a hang in bt_get() easily. The four call traces reported by echo w > /proc/sysrq-trigger are as follows:

Call Trace:
[<ffffffff813d60ac>] io_schedule+0x9c/0x130
[<ffffffff811b41bf>] bt_get+0xef/0x180
[<ffffffff811b450f>] blk_mq_get_tag+0x9f/0xd0
[<ffffffff811b09c6>] __blk_mq_alloc_request+0x16/0x1f0
[<ffffffff811b1da3>] blk_mq_map_request+0x123/0x130
[<ffffffff811b31c9>] blk_mq_make_request+0x69/0x280
[<ffffffff811a8420>] generic_make_request+0xc0/0x110
[<ffffffff811a84d4>] submit_bio+0x64/0x130
[<ffffffff81147848>] do_blockdev_direct_IO+0x1dc8/0x2da0
[<ffffffff81148867>] __blockdev_direct_IO+0x47/0x50
[<ffffffff811435c9>] blkdev_direct_IO+0x49/0x50
[<ffffffff810c8ce6>] generic_file_read_iter+0x546/0x610
[<ffffffff81143962>] blkdev_read_iter+0x32/0x40
[<ffffffff81155358>] aio_run_iocb+0x1f8/0x400
[<ffffffff811562c1>] do_io_submit+0x121/0x490
[<ffffffff8115663b>] SyS_io_submit+0xb/0x10
[<ffffffff813d9612>] system_call_fastpath+0x12/0x17

Please let me know if you need more information.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/