Re: [PATCH 0/1] tests/throtl: add a deadlock regression test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

在 2025/09/23 16:12, Shinichiro Kawasaki 写道:
On Sep 18, 2025 / 16:53, Yu Kuai wrote:
From: Yu Kuai <yukuai3@xxxxxxxxxx>

While I'm looking at another deadlock issue for blk-throtl, it's found
during test that lockdep is reporting another issue quite eazy, I'm
adding regerssion test for now, if anyone is interested. Otherwise, I'll
go back for this after I finish the problem at hand later.

BTW, maybe we can support to test for scsi_debug instead of null_blk for
all the throtl tests.

This is a good chance to use blktests' feature to repeat test cases by different
conditions [1]. Test cases can implement set_conditions() hooks for that
purpose.

[1] https://github.com/linux-blktests/blktests/blob/a997ab0ca9b77ddf31b8c632bfe57f7bd75e305e/new#L183

Yu, FYI, I quickly implemented the set_conditions() hooks for the throtl group,
and attach it as a patch. When you have time, please try it out. Each test case
runs twice for null_blk and scsi_debug [2].

- With this patch, the lockdep splat is recreated at throtl/004. It is
   observed at throtl/001 also as show in [2].
- throtl/002 fails for scsi_debug. I guess performance difference between
   null_blk and scsi_debug is the cause, but not so sure.
- Results are placed in results/nodev_nullb and results/nodev_sdebug.

If you think this approach is good, I will prepare a formal patch series.



I do not look into the patch in detail, however, I think this is
perfect.
[2]

# ./check throtl
throtl/001 (nullb) (basic functionality)                     [passed]
     runtime  4.546s  ...  4.753s
throtl/001 (sdebug) (basic functionality)                    [failed]
     runtime  5.386s  ...  5.842s
     something found in dmesg:
     [   79.444897] [   T1156] run blktests throtl/001 at 2025-09-23 17:05:22
     [   79.684859] [   T1260] sd 9:0:0:0: [sdd] Synchronizing SCSI cache
     [   80.002576] [   T1262] scsi_debug:sdebug_driver_probe: scsi_debug: trim poll_queues to 0. poll_q/nr_hw = (0/1)
     [   80.003950] [   T1262] scsi host9: scsi_debug: version 0191 [20210520]
                                 dev_size_mb=1024, opts=0x0, submit_queues=1, statistics=0
     [   80.009307] [   T1262] scsi 9:0:0:0: Direct-Access     Linux    scsi_debug       0191 PQ: 0 ANSI: 7
     [   80.011952] [      C2] scsi 9:0:0:0: Power-on or device reset occurred
     [   80.018583] [   T1262] sd 9:0:0:0: Attached scsi generic sg3 type 0
     [   80.020594] [    T103] sd 9:0:0:0: [sdd] 2097152 512-byte logical blocks: (1.07 GB/1.00 GiB)
     [   80.022826] [    T103] sd 9:0:0:0: [sdd] Write Protect is off
     ...
     (See '/home/shin/Blktests/blktests/results/nodev_sdebug/throtl/001.dmesg' for the entire message)
throtl/002 (nullb) (iops limit over IO split)                [passed]
     runtime  2.586s  ...  2.486s
throtl/002 (sdebug) (iops limit over IO split)               [failed]
     runtime  6.137s  ...  6.467s
     --- tests/throtl/002.out    2025-09-23 14:05:35.011885439 +0900
     +++ /home/shin/Blktests/blktests/results/nodev_sdebug/throtl/002.out.bad    2025-09-23 17:05:37.209794003 +0900
     @@ -1,4 +1,4 @@
      Running throtl/002
     -1
     -1
     +3
     +3

I don't feel this is related to performance, we'll have to check later.

Thanks,
Kuai

      Test complete
throtl/003 (nullb) (bps limit over IO split)                 [passed]
     runtime  2.554s  ...  2.424s
throtl/003 (sdebug) (bps limit over IO split)                [passed]
     runtime  3.075s  ...  2.924s
throtl/004 (nullb) (delete disk while IO is throttled)       [passed]
     runtime  1.269s  ...  1.071s
throtl/004 (sdebug) (delete disk while IO is throttled)      [passed]
     runtime  2.142s  ...  1.471s
throtl/005 (nullb) (change config with throttled IO)         [passed]
     runtime  3.345s  ...  3.420s
throtl/005 (sdebug) (change config with throttled IO)        [passed]
     runtime  3.905s  ...  3.984s
throtl/006 (nullb) (test if meta IO has higher priority than data IO) [passed]
     runtime  13.014s  ...  13.086s
throtl/006 (sdebug) (test if meta IO has higher priority than data IO) [passed]
     runtime  5.715s  ...  5.631s
throtl/007 (nullb) (bps limit with iops limit over io split) [passed]
     runtime  4.527s  ...  4.476s
throtl/007 (sdebug) (bps limit with iops limit over io split) [passed]
     runtime  5.065s  ...  5.043s






[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux