mbox series

[v2,0/8] md: fix and refactor io accounting and 'active_io'

Message ID 20230621165110.1498313-1-yukuai1@huaweicloud.com (mailing list archive)
Headers show
Series md: fix and refactor io accounting and 'active_io' | expand

Message

Yu Kuai June 21, 2023, 4:51 p.m. UTC
From: Yu Kuai <yukuai3@huawei.com>

Changes in v2:
 - fix some typos;
 - add review tag;

This patchset do following things:
 - make io accounting for all raid levels consistent, patch 1, 3-5;
 - enable io accounting for all raid levels, patch 6-8;
 - hold 'active_io' before io start to dispatch, and release 'active_io'
 when io is done, make mddev_suspend() will wait for io to be done, patch 2

This patch set also prepare to synchronize io and raid configuration, make
it possible to use 'active_io' in common layer to judge if normal io is
in flight.

Yu Kuai (8):
  md: move initialization and destruction of 'io_acct_set' to md.c
  md: also clone new io if io accounting is disabled
  raid5: fix missing io accounting in raid5_align_endio()
  md/raid1: switch to use md_account_bio() for io accounting
  md/raid10: switch to use md_account_bio() for io accounting
  md/md-multipath: enable io accounting
  md/md-linear: enable io accounting
  md/md-faulty: enable io accounting

 drivers/md/md-faulty.c    |  2 +
 drivers/md/md-linear.c    |  1 +
 drivers/md/md-multipath.c |  1 +
 drivers/md/md.c           | 78 +++++++++++++++++++--------------------
 drivers/md/md.h           |  6 +--
 drivers/md/raid0.c        | 16 +-------
 drivers/md/raid1.c        | 14 +++----
 drivers/md/raid1.h        |  1 -
 drivers/md/raid10.c       | 20 +++++-----
 drivers/md/raid10.h       |  1 -
 drivers/md/raid5.c        | 70 ++++++++++-------------------------
 11 files changed, 79 insertions(+), 131 deletions(-)

Comments

Song Liu June 21, 2023, 11:11 p.m. UTC | #1
On Wed, Jun 21, 2023 at 1:52 AM Yu Kuai <yukuai1@huaweicloud.com> wrote:
>
> From: Yu Kuai <yukuai3@huawei.com>
>
> Changes in v2:
>  - fix some typos;
>  - add review tag;
>
> This patchset do following things:
>  - make io accounting for all raid levels consistent, patch 1, 3-5;
>  - enable io accounting for all raid levels, patch 6-8;
>  - hold 'active_io' before io start to dispatch, and release 'active_io'
>  when io is done, make mddev_suspend() will wait for io to be done, patch 2
>
> This patch set also prepare to synchronize io and raid configuration, make
> it possible to use 'active_io' in common layer to judge if normal io is
> in flight.
>
> Yu Kuai (8):
>   md: move initialization and destruction of 'io_acct_set' to md.c
>   md: also clone new io if io accounting is disabled
>   raid5: fix missing io accounting in raid5_align_endio()
>   md/raid1: switch to use md_account_bio() for io accounting
>   md/raid10: switch to use md_account_bio() for io accounting
>   md/md-multipath: enable io accounting
>   md/md-linear: enable io accounting
>   md/md-faulty: enable io accounting

Applied to md-next.

Thanks,
Song

>
>  drivers/md/md-faulty.c    |  2 +
>  drivers/md/md-linear.c    |  1 +
>  drivers/md/md-multipath.c |  1 +
>  drivers/md/md.c           | 78 +++++++++++++++++++--------------------
>  drivers/md/md.h           |  6 +--
>  drivers/md/raid0.c        | 16 +-------
>  drivers/md/raid1.c        | 14 +++----
>  drivers/md/raid1.h        |  1 -
>  drivers/md/raid10.c       | 20 +++++-----
>  drivers/md/raid10.h       |  1 -
>  drivers/md/raid5.c        | 70 ++++++++++-------------------------
>  11 files changed, 79 insertions(+), 131 deletions(-)
>
> --
> 2.39.2
>