Re: [PATCH] md: improve io stats accounting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Artur,

Thanks for the patch.

On Mon, Jun 1, 2020 at 9:13 AM Artur Paszkiewicz
<artur.paszkiewicz@xxxxxxxxx> wrote:
>
> Use generic io accounting functions to manage io stats. There was an
[...]

> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@xxxxxxxxx>
> ---
>  drivers/md/md.c | 65 +++++++++++++++++++++++++++++++++++++++----------
>  drivers/md/md.h |  1 +
>  2 files changed, 53 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index f567f536b529..5a9f167ef5b9 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -463,12 +463,32 @@ void md_handle_request(struct mddev *mddev, struct bio *bio)
>  }
>  EXPORT_SYMBOL(md_handle_request);
>
>

[...]

>
> -       /*
> -        * save the sectors now since our bio can
> -        * go away inside make_request
> -        */
> -       sectors = bio_sectors(bio);
> +       if (bio->bi_pool != &mddev->md_io_bs) {
> +               struct bio *clone;
> +               struct md_io *md_io;
> +
> +               clone = bio_clone_fast(bio, GFP_NOIO, &mddev->md_io_bs);

Handle clone == NULL?

Also, have you done benchmarks with this change?

Song



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux