Hi, 在 2025/06/13 10:35, Zizhi Wo 写道:
From: Zizhi Wo <wozizhi@xxxxxxxxxx> Test change config while IO is throttled, for IO splitting scenario. Regression test for commit d1ba22ab2bec ("blk-throttle: Prevents the bps restricted io from entering the bps queue again"). Signed-off-by: Zizhi Wo <wozizhi@xxxxxxxxxx> --- tests/throtl/007 | 41 +++++++++++++++++++++++++++++++++++++++++ tests/throtl/007.out | 6 ++++++ 2 files changed, 47 insertions(+) create mode 100755 tests/throtl/007 create mode 100644 tests/throtl/007.out diff --git a/tests/throtl/007 b/tests/throtl/007 new file mode 100755 index 0000000..98ba4ea --- /dev/null +++ b/tests/throtl/007 @@ -0,0 +1,41 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-3.0+ +# Copyright (C) 2025 Zizhi Wo +# +# Test change config while IO is throttled, for IO splitting scenario.
This test do not change config while IO is throttled, it's iops limit over io split.
+# Regression test for commit d1ba22ab2bec ("blk-throttle: Prevents the bps +# restricted io from entering the bps queue again") + +. tests/throtl/rc + +DESCRIPTION="bps limit with iops limit over io split" +QUICK=1 + +test() { + echo "Running ${TEST_NAME}" + + if ! _set_up_throtl max_sectors=8; then + return 1; + fi
And this should be updated, please take a look at 60fa2e3 ("throtl/{002,003}: update max_sectors setting"). Thanks, Kuai
+ + local bps_limit=$((1024 * 1024)) + local iops_limit=1000000 + + # just set bps limit first + _throtl_set_limits wbps=$bps_limit + _throtl_test_io write 1M 1 & + _throtl_test_io write 1M 1 & + wait + _throtl_remove_limits + + # set the same bps limit and a high iops limit + # should behave the same as no iops limit + _throtl_set_limits wbps=$bps_limit wiops=$iops_limit + _throtl_test_io write 1M 1 & + _throtl_test_io write 1M 1 & + wait + _throtl_remove_limits + + _clean_up_throtl + echo "Test complete" +} diff --git a/tests/throtl/007.out b/tests/throtl/007.out new file mode 100644 index 0000000..d28cdef --- /dev/null +++ b/tests/throtl/007.out @@ -0,0 +1,6 @@ +Running throtl/007 +1 +2 +1 +2 +Test complete