On 11/24/20 11:28 AM, Bart Van Assche wrote:
On 11/23/20 5:04 PM, Yi Zhang wrote:
There is no cfg scheduler and new added kyber scheduler in lastest kernel,
^^^
cfq?
Thanks.
so get the scheduler from sysfs
[ ... ]
# Load all I/O scheduler kernel modules
for m in "/lib/modules/$(uname -r)/kernel/block/"*.ko; do
@@ -17,15 +17,17 @@ test_io_schedulers() {
for mq in y n; do
use_blk_mq ${mq} || return $?
dev=$(get_bdev 0) || return $?
- for sched in noop deadline bfq cfq; do
- set_scheduler "$(basename "$(readlink -f "${dev}")")" $sched \
+ dm=$(basename "$(readlink -f "${dev}")") || return $?
+ scheds=$(sed 's/[][]//g' /sys/block/"$dm"/queue/scheduler) || return $?
+ for sched in $scheds; do
+ set_scheduler "$dm" "$sched" \
Similar code occurs in tests/srp/012. Please introduce a function for
retrieving the scheduler list and also update tests/srp/012.
OK, will add below function and update both nvmeof-mp/012 and srp/012
diff --git a/common/multipath-over-rdma b/common/multipath-over-rdma
index d0fec6f..d156a12 100644
--- a/common/multipath-over-rdma
+++ b/common/multipath-over-rdma
@@ -326,6 +326,18 @@ set_scheduler() {
fi
}
+# Get block dev scheduler list
+get_scheduler_list() {
+ local b=$1 p
+ p=/sys/block/"$b"/queue/scheduler
+ if [ -e "$p" ]; then
+ scheds=$(sed 's/[][]//g' /sys/block/"$b"/queue/scheduler)
+ echo "$scheds"
+ else
+ return 1
+ fi
+}
+
Thanks,
Bart.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-nvme