Bug 215485

Summary: mismatch between front_merges and async_depth tunable
Product: IO/Storage Reporter: gzhqyz
Component: Block LayerAssignee: Jens Axboe (axboe)
Status: RESOLVED CODE_FIX    
Severity: normal CC: regressions
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.16 Subsystem:
Regression: No Bisected commit-id:

Description gzhqyz 2022-01-12 09:21:20 UTC
Hi, commit 0775758 ("block/mq-deadline: Reserve 25% of scheduler tags for synchronous requests") add async_depth parameter to mq-deadline. If I unstandard correctly, its value is stored to front_merges, see [1]. If I change async_depth, front_merges is also changed. I'm not pretty sure, but it seems like a mistake as front_merges should be a bool value[2].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/block/mq-deadline.c?h=v5.16#n898
[2] https://www.kernel.org/doc/Documentation/block/deadline-iosched.txt

# grep -R . /sys/block/*/queue/iosched/
/sys/block/sda/queue/iosched/front_merges:1
/sys/block/sda/queue/iosched/read_expire:200
/sys/block/sda/queue/iosched/prio_aging_expire:10000
/sys/block/sda/queue/iosched/fifo_batch:16
/sys/block/sda/queue/iosched/write_expire:5000
/sys/block/sda/queue/iosched/writes_starved:4
/sys/block/sda/queue/iosched/async_depth:1

# echo 1234 > /sys/block/sda/queue/iosched/async_depth

# grep -R . /sys/block/*/queue/iosched/
/sys/block/sda/queue/iosched/front_merges:1234
/sys/block/sda/queue/iosched/read_expire:200
/sys/block/sda/queue/iosched/prio_aging_expire:10000
/sys/block/sda/queue/iosched/fifo_batch:16
/sys/block/sda/queue/iosched/write_expire:5000
/sys/block/sda/queue/iosched/writes_starved:4
/sys/block/sda/queue/iosched/async_depth:1234
Comment 1 The Linux kernel's regression tracker (Thorsten Leemhuis) 2022-01-20 12:27:38 UTC
is this a regression? e.g., is there anything that works worse due to that change?

BTW, bugzilla might be a bad place for this kind of thing, better report it my email, as outlined here: https://www.kernel.org/doc/html/latest/admin-guide/reporting-issues.html
Comment 3 Jens Axboe 2022-01-20 17:32:50 UTC
Thanks for reporting this!