mbox series

[RFC,V4,0/4] block: add two statistic tables

Message ID 20210110094457.6624-1-guoqing.jiang@cloud.ionos.com (mailing list archive)
Headers show
Series block: add two statistic tables | expand

Message

Guoqing Jiang Jan. 10, 2021, 9:44 a.m. UTC
Hi,

No more comments since the last version, so this version is just rebase
with latest tree.

To make the tables work, it is necessary to enable BLK_ADDITIONAL_DISKSTAT
option, and also enable the sysfs node.
# echo 1 > /sys/block/md0/queue/io_extra_stats

After that, the size and latency of io are recorded in each table.

Thanks,
Guoqing

RFC V3: https://marc.info/?l=linux-block&m=159730633416534&w=2
* Move the #ifdef CONFIG_BLK_ADDITIONAL_DISKSTAT into the function body
  per Johannes's comment.
* Tweak the output of two tables to make they are more intuitive

RFC V2: https://marc.info/?l=linux-block&m=159467483514062&w=2
* don't call ktime_get_ns and drop unnecessary patches.
* add io_extra_stats to avoid potential overhead.

RFC V1: https://marc.info/?l=linux-block&m=159419516730386&w=2

Guoqing Jiang (4):
  block: add a statistic table for io latency
  block: add a statistic table for io sector
  block: add io_extra_stats node
  block: call blk_additional_{latency,sector} only when io_extra_stats
    is true

 Documentation/ABI/testing/sysfs-block | 26 +++++++++
 Documentation/block/queue-sysfs.rst   |  6 +++
 block/Kconfig                         |  9 ++++
 block/blk-core.c                      | 51 ++++++++++++++++++
 block/blk-sysfs.c                     | 10 ++++
 block/genhd.c                         | 78 +++++++++++++++++++++++++++
 include/linux/blkdev.h                |  6 +++
 include/linux/part_stat.h             |  8 +++
 8 files changed, 194 insertions(+)

Comments

Jinpu Wang Jan. 20, 2021, 12:52 p.m. UTC | #1
On Sun, Jan 10, 2021 at 10:45 AM Guoqing Jiang
<guoqing.jiang@cloud.ionos.com> wrote:
>
> Hi,
>
> No more comments since the last version, so this version is just rebase
> with latest tree.
>
> To make the tables work, it is necessary to enable BLK_ADDITIONAL_DISKSTAT
> option, and also enable the sysfs node.
> # echo 1 > /sys/block/md0/queue/io_extra_stats
>
> After that, the size and latency of io are recorded in each table.
>
> Thanks,
> Guoqing
>
> RFC V3: https://marc.info/?l=linux-block&m=159730633416534&w=2
> * Move the #ifdef CONFIG_BLK_ADDITIONAL_DISKSTAT into the function body
>   per Johannes's comment.
> * Tweak the output of two tables to make they are more intuitive
>
> RFC V2: https://marc.info/?l=linux-block&m=159467483514062&w=2
> * don't call ktime_get_ns and drop unnecessary patches.
> * add io_extra_stats to avoid potential overhead.
>
> RFC V1: https://marc.info/?l=linux-block&m=159419516730386&w=2
>
> Guoqing Jiang (4):
>   block: add a statistic table for io latency
>   block: add a statistic table for io sector
>   block: add io_extra_stats node
>   block: call blk_additional_{latency,sector} only when io_extra_stats
>     is true
>
>  Documentation/ABI/testing/sysfs-block | 26 +++++++++
>  Documentation/block/queue-sysfs.rst   |  6 +++
>  block/Kconfig                         |  9 ++++
>  block/blk-core.c                      | 51 ++++++++++++++++++
>  block/blk-sysfs.c                     | 10 ++++
>  block/genhd.c                         | 78 +++++++++++++++++++++++++++
>  include/linux/blkdev.h                |  6 +++
>  include/linux/part_stat.h             |  8 +++
>  8 files changed, 194 insertions(+)
>
> --
> 2.17.1
>
For the whole series,  look good to me, thx.
Reviewed-by: Jack Wang <jinpu.wang@cloud.ionos.com>