linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] add/update/fix BFQ docs
@ 2021-06-11  3:07 Kir Kolyshkin
  2021-06-11  3:07 ` [PATCH 1/3] docs: block/bfq: describe per-device weight Kir Kolyshkin
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Kir Kolyshkin @ 2021-06-11  3:07 UTC (permalink / raw)
  To: linux-doc
  Cc: Jonathan Corbet, tj, axboe, paolo.valente, cgroups, Kir Kolyshkin

Improve BFQ docs: fix formatting, adding a missing piece.

Fix cgroup v1 blkio docs which are not updated for CFQ -> BFQ.

Patches are on top of the latest docs-next (commit acda97acb2e98c97895).

Kir Kolyshkin (3):
  docs: block/bfq: describe per-device weight
  docs/cgroup-v1/blkio: stop abusing itemized list
  docs/cgroup-v1/blkio: update for 5.x kernels

 .../cgroup-v1/blkio-controller.rst            | 155 +++++++++---------
 Documentation/block/bfq-iosched.rst           |  38 +++--
 2 files changed, 107 insertions(+), 86 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/3] docs: block/bfq: describe per-device weight
  2021-06-11  3:07 [PATCH 0/3] add/update/fix BFQ docs Kir Kolyshkin
@ 2021-06-11  3:07 ` Kir Kolyshkin
  2021-06-13 23:14   ` Jonathan Corbet
  2021-06-11  3:07 ` [PATCH 2/3] docs/cgroup-v1/blkio: stop abusing itemized list Kir Kolyshkin
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Kir Kolyshkin @ 2021-06-11  3:07 UTC (permalink / raw)
  To: linux-doc
  Cc: Jonathan Corbet, tj, axboe, paolo.valente, cgroups, Kir Kolyshkin

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

While at it, improve formatting a bit.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
---
 Documentation/block/bfq-iosched.rst | 38 ++++++++++++++++++++---------
 1 file changed, 27 insertions(+), 11 deletions(-)

diff --git a/Documentation/block/bfq-iosched.rst b/Documentation/block/bfq-iosched.rst
index 66c5a4e54130..7200152c461e 100644
--- a/Documentation/block/bfq-iosched.rst
+++ b/Documentation/block/bfq-iosched.rst
@@ -553,20 +553,36 @@ throughput sustainable with bfq, because updating the blkio.bfq.*
 stats is rather costly, especially for some of the stats enabled by
 CONFIG_BFQ_CGROUP_DEBUG.
 
-Parameters to set
------------------
+Parameters
+----------
 
-For each group, there is only the following parameter to set.
+For each group, the following parameters cat be set:
 
-weight (namely blkio.bfq.weight or io.bfq-weight): the weight of the
-group inside its parent. Available values: 1..1000 (default 100). The
-linear mapping between ioprio and weights, described at the beginning
-of the tunable section, is still valid, but all weights higher than
-IOPRIO_BE_NR*10 are mapped to ioprio 0.
+  weight
+        This specifies the default weight for the cgroup inside its parent.
+        Available values: 1..1000 (default: 100).
 
-Recall that, if low-latency is set, then BFQ automatically raises the
-weight of the queues associated with interactive and soft real-time
-applications. Unset this tunable if you need/want to control weights.
+        For cgroup v1, it is set by writing the value to `blkio.bfq.weight`.
+
+        For cgroup v2, it is set by writing the value to `io.bfq.weight`.
+        (with an optional prefix of `default` and a space).
+
+        The linear mapping between ioprio and weights, described at the beginning
+        of the tunable section, is still valid, but all weights higher than
+        IOPRIO_BE_NR*10 are mapped to ioprio 0.
+
+        Recall that, if low-latency is set, then BFQ automatically raises the
+        weight of the queues associated with interactive and soft real-time
+        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]
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] docs/cgroup-v1/blkio: stop abusing itemized list
  2021-06-11  3:07 [PATCH 0/3] add/update/fix BFQ docs Kir Kolyshkin
  2021-06-11  3:07 ` [PATCH 1/3] docs: block/bfq: describe per-device weight Kir Kolyshkin
@ 2021-06-11  3:07 ` Kir Kolyshkin
  2021-06-11  3:07 ` [PATCH 3/3] docs/cgroup-v1/blkio: update for 5.x kernels Kir Kolyshkin
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Kir Kolyshkin @ 2021-06-11  3:07 UTC (permalink / raw)
  To: linux-doc
  Cc: Jonathan Corbet, tj, axboe, paolo.valente, cgroups, Kir Kolyshkin

Fix many formatting issues by stop (ab)using itemized lists for
everything (mostly replaced by definition lists).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
---
 .../cgroup-v1/blkio-controller.rst            | 130 +++++++++---------
 1 file changed, 67 insertions(+), 63 deletions(-)

diff --git a/Documentation/admin-guide/cgroup-v1/blkio-controller.rst b/Documentation/admin-guide/cgroup-v1/blkio-controller.rst
index 36d43ae7dc13..8101dcba381d 100644
--- a/Documentation/admin-guide/cgroup-v1/blkio-controller.rst
+++ b/Documentation/admin-guide/cgroup-v1/blkio-controller.rst
@@ -17,36 +17,37 @@ level logical devices like device mapper.
 
 HOWTO
 =====
+
 Throttling/Upper Limit policy
 -----------------------------
-- Enable Block IO controller::
+Enable Block IO controller::
 
 	CONFIG_BLK_CGROUP=y
 
-- Enable throttling in block layer::
+Enable throttling in block layer::
 
 	CONFIG_BLK_DEV_THROTTLING=y
 
-- Mount blkio controller (see cgroups.txt, Why are cgroups needed?)::
+Mount blkio controller (see cgroups.txt, Why are cgroups needed?)::
 
         mount -t cgroup -o blkio none /sys/fs/cgroup/blkio
 
-- Specify a bandwidth rate on particular device for root group. The format
-  for policy is "<major>:<minor>  <bytes_per_second>"::
+Specify a bandwidth rate on particular device for root group. The format
+for policy is "<major>:<minor>  <bytes_per_second>"::
 
         echo "8:16  1048576" > /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device
 
-  Above will put a limit of 1MB/second on reads happening for root group
-  on device having major/minor number 8:16.
+This will put a limit of 1MB/second on reads happening for root group
+on device having major/minor number 8:16.
 
-- Run dd to read a file and see if rate is throttled to 1MB/s or not::
+Run dd to read a file and see if rate is throttled to 1MB/s or not::
 
         # dd iflag=direct if=/mnt/common/zerofile of=/dev/null bs=4K count=1024
         1024+0 records in
         1024+0 records out
         4194304 bytes (4.2 MB) copied, 4.0001 s, 1.0 MB/s
 
- Limits for writes can be put using blkio.throttle.write_bps_device file.
+Limits for writes can be put using blkio.throttle.write_bps_device file.
 
 Hierarchical Cgroups
 ====================
@@ -79,28 +80,31 @@ following::
 
 Various user visible config options
 ===================================
-CONFIG_BLK_CGROUP
-	- Block IO controller.
 
-CONFIG_BFQ_CGROUP_DEBUG
-	- Debug help. Right now some additional stats file show up in cgroup
+  CONFIG_BLK_CGROUP
+	  Block IO controller.
+
+  CONFIG_BFQ_CGROUP_DEBUG
+	  Debug help. Right now some additional stats file show up in cgroup
 	  if this option is enabled.
 
-CONFIG_BLK_DEV_THROTTLING
-	- Enable block device throttling support in block layer.
+  CONFIG_BLK_DEV_THROTTLING
+	  Enable block device throttling support in block layer.
 
 Details of cgroup files
 =======================
+
 Proportional weight policy files
 --------------------------------
-- blkio.weight
-	- Specifies per cgroup weight. This is default weight of the group
+
+  blkio.weight
+	  Specifies per cgroup weight. This is default weight of the group
 	  on all the devices until and unless overridden by per device rule.
 	  (See blkio.weight_device).
 	  Currently allowed range of weights is from 10 to 1000.
 
-- blkio.weight_device
-	- One can specify per cgroup per device rules using this interface.
+  blkio.weight_device
+	  One can specify per cgroup per device rules using this interface.
 	  These rules override the default value of group weight as specified
 	  by blkio.weight.
 
@@ -130,34 +134,34 @@ Proportional weight policy files
 	    dev     weight
 	    8:16    300
 
-- blkio.time
-	- disk time allocated to cgroup per device in milliseconds. First
+  blkio.time
+	  Disk time allocated to cgroup per device in milliseconds. First
 	  two fields specify the major and minor number of the device and
 	  third field specifies the disk time allocated to group in
 	  milliseconds.
 
-- blkio.sectors
-	- number of sectors transferred to/from disk by the group. First
+  blkio.sectors
+	  Number of sectors transferred to/from disk by the group. First
 	  two fields specify the major and minor number of the device and
 	  third field specifies the number of sectors transferred by the
 	  group to/from the device.
 
-- blkio.io_service_bytes
-	- Number of bytes transferred to/from the disk by the group. These
+  blkio.io_service_bytes
+	  Number of bytes transferred to/from the disk by the group. These
 	  are further divided by the type of operation - read or write, sync
 	  or async. First two fields specify the major and minor number of the
 	  device, third field specifies the operation type and the fourth field
 	  specifies the number of bytes.
 
-- blkio.io_serviced
-	- Number of IOs (bio) issued to the disk by the group. These
+  blkio.io_serviced
+	  Number of IOs (bio) issued to the disk by the group. These
 	  are further divided by the type of operation - read or write, sync
 	  or async. First two fields specify the major and minor number of the
 	  device, third field specifies the operation type and the fourth field
 	  specifies the number of IOs.
 
-- blkio.io_service_time
-	- Total amount of time between request dispatch and request completion
+  blkio.io_service_time
+	  Total amount of time between request dispatch and request completion
 	  for the IOs done by this cgroup. This is in nanoseconds to make it
 	  meaningful for flash devices too. For devices with queue depth of 1,
 	  this time represents the actual service time. When queue_depth > 1,
@@ -170,8 +174,8 @@ Proportional weight policy files
 	  specifies the operation type and the fourth field specifies the
 	  io_service_time in ns.
 
-- blkio.io_wait_time
-	- Total amount of time the IOs for this cgroup spent waiting in the
+  blkio.io_wait_time
+	  Total amount of time the IOs for this cgroup spent waiting in the
 	  scheduler queues for service. This can be greater than the total time
 	  elapsed since it is cumulative io_wait_time for all IOs. It is not a
 	  measure of total time the cgroup spent waiting but rather a measure of
@@ -185,24 +189,24 @@ Proportional weight policy files
 	  minor number of the device, third field specifies the operation type
 	  and the fourth field specifies the io_wait_time in ns.
 
-- blkio.io_merged
-	- Total number of bios/requests merged into requests belonging to this
+  blkio.io_merged
+	  Total number of bios/requests merged into requests belonging to this
 	  cgroup. This is further divided by the type of operation - read or
 	  write, sync or async.
 
-- blkio.io_queued
-	- Total number of requests queued up at any given instant for this
+  blkio.io_queued
+	  Total number of requests queued up at any given instant for this
 	  cgroup. This is further divided by the type of operation - read or
 	  write, sync or async.
 
-- blkio.avg_queue_size
-	- Debugging aid only enabled if CONFIG_BFQ_CGROUP_DEBUG=y.
+  blkio.avg_queue_size
+	  Debugging aid only enabled if CONFIG_BFQ_CGROUP_DEBUG=y.
 	  The average queue size for this cgroup over the entire time of this
 	  cgroup's existence. Queue size samples are taken each time one of the
 	  queues of this cgroup gets a timeslice.
 
-- blkio.group_wait_time
-	- Debugging aid only enabled if CONFIG_BFQ_CGROUP_DEBUG=y.
+  blkio.group_wait_time
+	  Debugging aid only enabled if CONFIG_BFQ_CGROUP_DEBUG=y.
 	  This is the amount of time the cgroup had to wait since it became busy
 	  (i.e., went from 0 to 1 request queued) to get a timeslice for one of
 	  its queues. This is different from the io_wait_time which is the
@@ -212,8 +216,8 @@ Proportional weight policy files
 	  will only report the group_wait_time accumulated till the last time it
 	  got a timeslice and will not include the current delta.
 
-- blkio.empty_time
-	- Debugging aid only enabled if CONFIG_BFQ_CGROUP_DEBUG=y.
+  blkio.empty_time
+	  Debugging aid only enabled if CONFIG_BFQ_CGROUP_DEBUG=y.
 	  This is the amount of time a cgroup spends without any pending
 	  requests when not being served, i.e., it does not include any time
 	  spent idling for one of the queues of the cgroup. This is in
@@ -221,8 +225,8 @@ Proportional weight policy files
 	  the stat will only report the empty_time accumulated till the last
 	  time it had a pending request and will not include the current delta.
 
-- blkio.idle_time
-	- Debugging aid only enabled if CONFIG_BFQ_CGROUP_DEBUG=y.
+  blkio.idle_time
+	  Debugging aid only enabled if CONFIG_BFQ_CGROUP_DEBUG=y.
 	  This is the amount of time spent by the IO scheduler idling for a
 	  given cgroup in anticipation of a better request than the existing ones
 	  from other queues/cgroups. This is in nanoseconds. If this is read
@@ -230,60 +234,60 @@ Proportional weight policy files
 	  idle_time accumulated till the last idle period and will not include
 	  the current delta.
 
-- blkio.dequeue
-	- Debugging aid only enabled if CONFIG_BFQ_CGROUP_DEBUG=y. This
+  blkio.dequeue
+	  Debugging aid only enabled if CONFIG_BFQ_CGROUP_DEBUG=y. This
 	  gives the statistics about how many a times a group was dequeued
 	  from service tree of the device. First two fields specify the major
 	  and minor number of the device and third field specifies the number
 	  of times a group was dequeued from a particular device.
 
-- blkio.*_recursive
-	- Recursive version of various stats. These files show the
+  blkio.*_recursive
+	  Recursive version of various stats. These files show the
           same information as their non-recursive counterparts but
           include stats from all the descendant cgroups.
 
 Throttling/Upper limit policy files
 -----------------------------------
-- blkio.throttle.read_bps_device
-	- Specifies upper limit on READ rate from the device. IO rate is
+  blkio.throttle.read_bps_device
+	  Specifies upper limit on READ rate from the device. IO rate is
 	  specified in bytes per second. Rules are per device. Following is
 	  the format::
 
 	    echo "<major>:<minor>  <rate_bytes_per_second>" > /cgrp/blkio.throttle.read_bps_device
 
-- blkio.throttle.write_bps_device
-	- Specifies upper limit on WRITE rate to the device. IO rate is
+  blkio.throttle.write_bps_device
+	  Specifies upper limit on WRITE rate to the device. IO rate is
 	  specified in bytes per second. Rules are per device. Following is
 	  the format::
 
 	    echo "<major>:<minor>  <rate_bytes_per_second>" > /cgrp/blkio.throttle.write_bps_device
 
-- blkio.throttle.read_iops_device
-	- Specifies upper limit on READ rate from the device. IO rate is
+  blkio.throttle.read_iops_device
+	  Specifies upper limit on READ rate from the device. IO rate is
 	  specified in IO per second. Rules are per device. Following is
 	  the format::
 
 	   echo "<major>:<minor>  <rate_io_per_second>" > /cgrp/blkio.throttle.read_iops_device
 
-- blkio.throttle.write_iops_device
-	- Specifies upper limit on WRITE rate to the device. IO rate is
+  blkio.throttle.write_iops_device
+	  Specifies upper limit on WRITE rate to the device. IO rate is
 	  specified in io per second. Rules are per device. Following is
 	  the format::
 
 	    echo "<major>:<minor>  <rate_io_per_second>" > /cgrp/blkio.throttle.write_iops_device
 
-Note: If both BW and IOPS rules are specified for a device, then IO is
-      subjected to both the constraints.
+          Note: If both BW and IOPS rules are specified for a device, then IO is
+          subjected to both the constraints.
 
-- blkio.throttle.io_serviced
-	- Number of IOs (bio) issued to the disk by the group. These
+  blkio.throttle.io_serviced
+	  Number of IOs (bio) issued to the disk by the group. These
 	  are further divided by the type of operation - read or write, sync
 	  or async. First two fields specify the major and minor number of the
 	  device, third field specifies the operation type and the fourth field
 	  specifies the number of IOs.
 
-- blkio.throttle.io_service_bytes
-	- Number of bytes transferred to/from the disk by the group. These
+  blkio.throttle.io_service_bytes
+	  Number of bytes transferred to/from the disk by the group. These
 	  are further divided by the type of operation - read or write, sync
 	  or async. First two fields specify the major and minor number of the
 	  device, third field specifies the operation type and the fourth field
@@ -291,6 +295,6 @@ Note: If both BW and IOPS rules are specified for a device, then IO is
 
 Common files among various policies
 -----------------------------------
-- blkio.reset_stats
-	- Writing an int to this file will result in resetting all the stats
+  blkio.reset_stats
+	  Writing an int to this file will result in resetting all the stats
 	  for that cgroup.
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/3] docs/cgroup-v1/blkio: update for 5.x kernels
  2021-06-11  3:07 [PATCH 0/3] add/update/fix BFQ docs Kir Kolyshkin
  2021-06-11  3:07 ` [PATCH 1/3] docs: block/bfq: describe per-device weight Kir Kolyshkin
  2021-06-11  3:07 ` [PATCH 2/3] docs/cgroup-v1/blkio: stop abusing itemized list Kir Kolyshkin
@ 2021-06-11  3:07 ` Kir Kolyshkin
  2021-06-16 15:46 ` [PATCH 0/3] add/update/fix BFQ docs Tejun Heo
  2021-06-16 17:32 ` Jens Axboe
  4 siblings, 0 replies; 10+ messages in thread
From: Kir Kolyshkin @ 2021-06-11  3:07 UTC (permalink / raw)
  To: linux-doc
  Cc: Jonathan Corbet, tj, axboe, paolo.valente, cgroups, Kir Kolyshkin

Commit bf382fb0bcef4 ("block: remove legacy IO schedulers", Oct 12 2018)
removes the CFQ scheduler, together with blkio.weight and
blkio.weight_device described in cgroup v1 documentation. Users are
supposed to use the BFQ scheduler, which cgroup file for setting weight
is blkio.bfq.weight, but there is no way to set per-device weight.

Later, commit 795fe54c2a8 per-device weights for BFQ, meaning that
blkio.bfq.weight and blkio.bfq.weight_device can be used in a way
similar to the old CFQ cgroup interface.

Yet, the cgroup v1 docs were never updated. Fix this:
 - use the new file names;
 - fix the range for weight (used to be 10..1000, now 1..1000);
 - link to BFQ scheduler docs.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
---
 .../cgroup-v1/blkio-controller.rst            | 31 ++++++++++---------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/Documentation/admin-guide/cgroup-v1/blkio-controller.rst b/Documentation/admin-guide/cgroup-v1/blkio-controller.rst
index 8101dcba381d..16253eda192e 100644
--- a/Documentation/admin-guide/cgroup-v1/blkio-controller.rst
+++ b/Documentation/admin-guide/cgroup-v1/blkio-controller.rst
@@ -97,40 +97,41 @@ Details of cgroup files
 Proportional weight policy files
 --------------------------------
 
-  blkio.weight
+  blkio.bfq.weight
 	  Specifies per cgroup weight. This is default weight of the group
-	  on all the devices until and unless overridden by per device rule.
-	  (See blkio.weight_device).
-	  Currently allowed range of weights is from 10 to 1000.
+	  on all the devices until and unless overridden by per device rule
+	  (see `blkio.bfq.weight_device` below).
 
-  blkio.weight_device
-	  One can specify per cgroup per device rules using this interface.
-	  These rules override the default value of group weight as specified
-	  by blkio.weight.
+	  Currently allowed range of weights is from 1 to 1000. For more details,
+          see Documentation/block/bfq-iosched.rst.
+
+  blkio.bfq.weight_device
+          Specifes per cgroup per device weights, overriding the default group
+          weight. For more details, see Documentation/block/bfq-iosched.rst.
 
 	  Following is the format::
 
-	    # echo dev_maj:dev_minor weight > blkio.weight_device
+	    # echo dev_maj:dev_minor weight > blkio.bfq.weight_device
 
 	  Configure weight=300 on /dev/sdb (8:16) in this cgroup::
 
-	    # echo 8:16 300 > blkio.weight_device
-	    # cat blkio.weight_device
+	    # echo 8:16 300 > blkio.bfq.weight_device
+	    # cat blkio.bfq.weight_device
 	    dev     weight
 	    8:16    300
 
 	  Configure weight=500 on /dev/sda (8:0) in this cgroup::
 
-	    # echo 8:0 500 > blkio.weight_device
-	    # cat blkio.weight_device
+	    # echo 8:0 500 > blkio.bfq.weight_device
+	    # cat blkio.bfq.weight_device
 	    dev     weight
 	    8:0     500
 	    8:16    300
 
 	  Remove specific weight for /dev/sda in this cgroup::
 
-	    # echo 8:0 0 > blkio.weight_device
-	    # cat blkio.weight_device
+	    # echo 8:0 0 > blkio.bfq.weight_device
+	    # cat blkio.bfq.weight_device
 	    dev     weight
 	    8:16    300
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] docs: block/bfq: describe per-device weight
  2021-06-11  3:07 ` [PATCH 1/3] docs: block/bfq: describe per-device weight Kir Kolyshkin
@ 2021-06-13 23:14   ` Jonathan Corbet
  2021-06-14 21:01     ` [PATCH v2] " Kir Kolyshkin
                       ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Jonathan Corbet @ 2021-06-13 23:14 UTC (permalink / raw)
  To: Kir Kolyshkin, linux-doc; +Cc: tj, axboe, paolo.valente, cgroups, Kir Kolyshkin

Kir Kolyshkin <kolyshkin@gmail.com> writes:

This work looks generally good, but...

> The functionality of setting per-device weight for BFQ was added
> in v5.4 (commit 795fe54c2a828099), but the documentation was never
> updated.
>
> While at it, improve formatting a bit.
>
> Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
> ---
>  Documentation/block/bfq-iosched.rst | 38 ++++++++++++++++++++---------
>  1 file changed, 27 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/block/bfq-iosched.rst b/Documentation/block/bfq-iosched.rst
> index 66c5a4e54130..7200152c461e 100644
> --- a/Documentation/block/bfq-iosched.rst
> +++ b/Documentation/block/bfq-iosched.rst
> @@ -553,20 +553,36 @@ throughput sustainable with bfq, because updating the blkio.bfq.*
>  stats is rather costly, especially for some of the stats enabled by
>  CONFIG_BFQ_CGROUP_DEBUG.
>  
> -Parameters to set
> ------------------
> +Parameters
> +----------
>  
> -For each group, there is only the following parameter to set.
> +For each group, the following parameters cat be set:

Could we please not introduce new typos while fixing other stuff?

Thanks,

jon

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] docs: block/bfq: describe per-device weight
  2021-06-13 23:14   ` Jonathan Corbet
@ 2021-06-14 21:01     ` Kir Kolyshkin
  2021-06-14 21:03     ` [PATCH 1/3] " Kirill Kolyshkin
  2021-06-14 21:41     ` [PATCH v2] " Kir Kolyshkin
  2 siblings, 0 replies; 10+ messages in thread
From: Kir Kolyshkin @ 2021-06-14 21:01 UTC (permalink / raw)
  To: Jonathan Corbet, linux-doc
  Cc: tj, axboe, paolo.valente, cgroups, Kir Kolyshkin

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

While at it, improve formatting a bit.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
---
 Documentation/block/bfq-iosched.rst | 38 ++++++++++++++++++++---------
 1 file changed, 27 insertions(+), 11 deletions(-)

diff --git a/Documentation/block/bfq-iosched.rst b/Documentation/block/bfq-iosched.rst
index 66c5a4e54130..7200152c461e 100644
--- a/Documentation/block/bfq-iosched.rst
+++ b/Documentation/block/bfq-iosched.rst
@@ -553,20 +553,36 @@ throughput sustainable with bfq, because updating the blkio.bfq.*
 stats is rather costly, especially for some of the stats enabled by
 CONFIG_BFQ_CGROUP_DEBUG.
 
-Parameters to set
------------------
+Parameters
+----------
 
-For each group, there is only the following parameter to set.
+For each group, the following parameters cat be set:
 
-weight (namely blkio.bfq.weight or io.bfq-weight): the weight of the
-group inside its parent. Available values: 1..1000 (default 100). The
-linear mapping between ioprio and weights, described at the beginning
-of the tunable section, is still valid, but all weights higher than
-IOPRIO_BE_NR*10 are mapped to ioprio 0.
+  weight
+        This specifies the default weight for the cgroup inside its parent.
+        Available values: 1..1000 (default: 100).
 
-Recall that, if low-latency is set, then BFQ automatically raises the
-weight of the queues associated with interactive and soft real-time
-applications. Unset this tunable if you need/want to control weights.
+        For cgroup v1, it is set by writing the value to `blkio.bfq.weight`.
+
+        For cgroup v2, it is set by writing the value to `io.bfq.weight`.
+        (with an optional prefix of `default` and a space).
+
+        The linear mapping between ioprio and weights, described at the beginning
+        of the tunable section, is still valid, but all weights higher than
+        IOPRIO_BE_NR*10 are mapped to ioprio 0.
+
+        Recall that, if low-latency is set, then BFQ automatically raises the
+        weight of the queues associated with interactive and soft real-time
+        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]
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] docs: block/bfq: describe per-device weight
  2021-06-13 23:14   ` Jonathan Corbet
  2021-06-14 21:01     ` [PATCH v2] " Kir Kolyshkin
@ 2021-06-14 21:03     ` Kirill Kolyshkin
  2021-06-14 21:41     ` [PATCH v2] " Kir Kolyshkin
  2 siblings, 0 replies; 10+ messages in thread
From: Kirill Kolyshkin @ 2021-06-14 21:03 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: linux-doc, tj, axboe, paolo.valente, cgroups

On Sun, Jun 13, 2021 at 4:14 PM Jonathan Corbet <corbet@lwn.net> wrote:
>
> Kir Kolyshkin <kolyshkin@gmail.com> writes:
>
> This work looks generally good, but...
>
> > The functionality of setting per-device weight for BFQ was added
> > in v5.4 (commit 795fe54c2a828099), but the documentation was never
> > updated.
> >
> > While at it, improve formatting a bit.
> >
> > Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
> > ---
> >  Documentation/block/bfq-iosched.rst | 38 ++++++++++++++++++++---------
> >  1 file changed, 27 insertions(+), 11 deletions(-)
> >
> > diff --git a/Documentation/block/bfq-iosched.rst b/Documentation/block/bfq-iosched.rst
> > index 66c5a4e54130..7200152c461e 100644
> > --- a/Documentation/block/bfq-iosched.rst
> > +++ b/Documentation/block/bfq-iosched.rst
> > @@ -553,20 +553,36 @@ throughput sustainable with bfq, because updating the blkio.bfq.*
> >  stats is rather costly, especially for some of the stats enabled by
> >  CONFIG_BFQ_CGROUP_DEBUG.
> >
> > -Parameters to set
> > ------------------
> > +Parameters
> > +----------
> >
> > -For each group, there is only the following parameter to set.
> > +For each group, the following parameters cat be set:
>
> Could we please not introduce new typos while fixing other stuff?

Are you a dog person? :)

Thanks for catching this, corrected patch sent.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] docs: block/bfq: describe per-device weight
  2021-06-13 23:14   ` Jonathan Corbet
  2021-06-14 21:01     ` [PATCH v2] " Kir Kolyshkin
  2021-06-14 21:03     ` [PATCH 1/3] " Kirill Kolyshkin
@ 2021-06-14 21:41     ` Kir Kolyshkin
  2 siblings, 0 replies; 10+ messages in thread
From: Kir Kolyshkin @ 2021-06-14 21:41 UTC (permalink / raw)
  To: Jonathan Corbet, linux-doc
  Cc: tj, axboe, paolo.valente, cgroups, Kir Kolyshkin

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

While at it, improve formatting a bit.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
---
 Documentation/block/bfq-iosched.rst | 38 ++++++++++++++++++++---------
 1 file changed, 27 insertions(+), 11 deletions(-)

diff --git a/Documentation/block/bfq-iosched.rst b/Documentation/block/bfq-iosched.rst
index 66c5a4e54130..df3a8a47f58c 100644
--- a/Documentation/block/bfq-iosched.rst
+++ b/Documentation/block/bfq-iosched.rst
@@ -553,20 +553,36 @@ throughput sustainable with bfq, because updating the blkio.bfq.*
 stats is rather costly, especially for some of the stats enabled by
 CONFIG_BFQ_CGROUP_DEBUG.
 
-Parameters to set
------------------
+Parameters
+----------
 
-For each group, there is only the following parameter to set.
+For each group, the following parameters can be set:
 
-weight (namely blkio.bfq.weight or io.bfq-weight): the weight of the
-group inside its parent. Available values: 1..1000 (default 100). The
-linear mapping between ioprio and weights, described at the beginning
-of the tunable section, is still valid, but all weights higher than
-IOPRIO_BE_NR*10 are mapped to ioprio 0.
+  weight
+        This specifies the default weight for the cgroup inside its parent.
+        Available values: 1..1000 (default: 100).
 
-Recall that, if low-latency is set, then BFQ automatically raises the
-weight of the queues associated with interactive and soft real-time
-applications. Unset this tunable if you need/want to control weights.
+        For cgroup v1, it is set by writing the value to `blkio.bfq.weight`.
+
+        For cgroup v2, it is set by writing the value to `io.bfq.weight`.
+        (with an optional prefix of `default` and a space).
+
+        The linear mapping between ioprio and weights, described at the beginning
+        of the tunable section, is still valid, but all weights higher than
+        IOPRIO_BE_NR*10 are mapped to ioprio 0.
+
+        Recall that, if low-latency is set, then BFQ automatically raises the
+        weight of the queues associated with interactive and soft real-time
+        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]
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/3] add/update/fix BFQ docs
  2021-06-11  3:07 [PATCH 0/3] add/update/fix BFQ docs Kir Kolyshkin
                   ` (2 preceding siblings ...)
  2021-06-11  3:07 ` [PATCH 3/3] docs/cgroup-v1/blkio: update for 5.x kernels Kir Kolyshkin
@ 2021-06-16 15:46 ` Tejun Heo
  2021-06-16 17:32 ` Jens Axboe
  4 siblings, 0 replies; 10+ messages in thread
From: Tejun Heo @ 2021-06-16 15:46 UTC (permalink / raw)
  To: Kir Kolyshkin; +Cc: linux-doc, Jonathan Corbet, axboe, paolo.valente, cgroups

On Thu, Jun 10, 2021 at 08:07:34PM -0700, Kir Kolyshkin wrote:
> Improve BFQ docs: fix formatting, adding a missing piece.
> 
> Fix cgroup v1 blkio docs which are not updated for CFQ -> BFQ.
> 
> Patches are on top of the latest docs-next (commit acda97acb2e98c97895).

Acked-by: Tejun Heo <tj@kernel.org>

Prolly best to go through the block tree.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/3] add/update/fix BFQ docs
  2021-06-11  3:07 [PATCH 0/3] add/update/fix BFQ docs Kir Kolyshkin
                   ` (3 preceding siblings ...)
  2021-06-16 15:46 ` [PATCH 0/3] add/update/fix BFQ docs Tejun Heo
@ 2021-06-16 17:32 ` Jens Axboe
  4 siblings, 0 replies; 10+ messages in thread
From: Jens Axboe @ 2021-06-16 17:32 UTC (permalink / raw)
  To: Kir Kolyshkin, linux-doc; +Cc: Jonathan Corbet, tj, paolo.valente, cgroups

On 6/10/21 9:07 PM, Kir Kolyshkin wrote:
> Improve BFQ docs: fix formatting, adding a missing piece.
> 
> Fix cgroup v1 blkio docs which are not updated for CFQ -> BFQ.
> 
> Patches are on top of the latest docs-next (commit acda97acb2e98c97895).

Applied, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-06-16 17:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11  3:07 [PATCH 0/3] add/update/fix BFQ docs Kir Kolyshkin
2021-06-11  3:07 ` [PATCH 1/3] docs: block/bfq: describe per-device weight Kir Kolyshkin
2021-06-13 23:14   ` Jonathan Corbet
2021-06-14 21:01     ` [PATCH v2] " Kir Kolyshkin
2021-06-14 21:03     ` [PATCH 1/3] " Kirill Kolyshkin
2021-06-14 21:41     ` [PATCH v2] " Kir Kolyshkin
2021-06-11  3:07 ` [PATCH 2/3] docs/cgroup-v1/blkio: stop abusing itemized list Kir Kolyshkin
2021-06-11  3:07 ` [PATCH 3/3] docs/cgroup-v1/blkio: update for 5.x kernels Kir Kolyshkin
2021-06-16 15:46 ` [PATCH 0/3] add/update/fix BFQ docs Tejun Heo
2021-06-16 17:32 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).