Commit fda0b5ba authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Jens Axboe
Browse files

docs: block/bfq: describe per-device weight



The functionality of setting per-device weight for BFQ was added
in v5.4 (commit 795fe54c), but the documentation was never
updated.

While at it, improve formatting a bit.

Signed-off-by: default avatarKir Kolyshkin <kolyshkin@gmail.com>
Link: https://lore.kernel.org/r/20210614214109.207430-1-kolyshkin@gmail.com


Acked-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent a72c374f
Loading
Loading
Loading
Loading
+27 −11
Original line number Original line Diff line number Diff line
@@ -553,14 +553,21 @@ throughput sustainable with bfq, because updating the blkio.bfq.*
stats is rather costly, especially for some of the stats enabled by
stats is rather costly, especially for some of the stats enabled by
CONFIG_BFQ_CGROUP_DEBUG.
CONFIG_BFQ_CGROUP_DEBUG.


Parameters to set
Parameters
-----------------
----------

For each group, the following parameters can be set:

  weight
        This specifies the default weight for the cgroup inside its parent.
        Available values: 1..1000 (default: 100).


For each group, there is only the following parameter to set.
        For cgroup v1, it is set by writing the value to `blkio.bfq.weight`.


weight (namely blkio.bfq.weight or io.bfq-weight): the weight of the
        For cgroup v2, it is set by writing the value to `io.bfq.weight`.
group inside its parent. Available values: 1..1000 (default 100). The
        (with an optional prefix of `default` and a space).
linear mapping between ioprio and weights, described at the beginning

        The linear mapping between ioprio and weights, described at the beginning
        of the tunable section, is still valid, but all weights higher than
        of the tunable section, is still valid, but all weights higher than
        IOPRIO_BE_NR*10 are mapped to ioprio 0.
        IOPRIO_BE_NR*10 are mapped to ioprio 0.


@@ -568,6 +575,15 @@ Recall that, if low-latency is set, then BFQ automatically raises the
        weight of the queues associated with interactive and soft real-time
        weight of the queues associated with interactive and soft real-time
        applications. Unset this tunable if you need/want to control weights.
        applications. Unset this tunable if you need/want to control weights.


  weight_device
        This specifies a per-device weight for the cgroup. The syntax is
        `minor:major weight`. A weight of `0` may be used to reset to the default
        weight.

        For cgroup v1, it is set by writing the value to `blkio.bfq.weight_device`.

        For cgroup v2, the file name is `io.bfq.weight`.



[1]
[1]
    P. Valente, A. Avanzini, "Evolution of the BFQ Storage I/O
    P. Valente, A. Avanzini, "Evolution of the BFQ Storage I/O