stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: gregkh@linuxfoundation.org
Cc: axboe@kernel.dk, stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] dm: revert partial fix for redundant bio-based IO accounting" failed to apply to 5.4-stable tree
Date: Tue, 8 Feb 2022 17:00:29 -0500	[thread overview]
Message-ID: <YgLn/Xax8fzFY5Z+@redhat.com> (raw)
In-Reply-To: <1643463094220106@kroah.com>

Hey Greg,

Turns out the fixes I marked for stable@ aren't actually fixing
anything (after applying the changes: code is cleaner but no
meaningful difference in IO stats).

That is because DM was already patching up the 'sectors' portion of
the stats after a split.  The other fields I documented in the
following header aren't tied to payload (see __part_start_io_acct).

So no _real_ need to backport to 5.4 or 5.10.  Sorry for the noise.

Mike

On Sat, Jan 29 2022 at  8:31P -0500,
gregkh@linuxfoundation.org <gregkh@linuxfoundation.org> wrote:

> 
> The patch below does not apply to the 5.4-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
> 
> thanks,
> 
> greg k-h
> 
> ------------------ original commit in Linus's tree ------------------
> 
> From f524d9c95fab54783d0038f7a3e8c014d5b56857 Mon Sep 17 00:00:00 2001
> From: Mike Snitzer <snitzer@redhat.com>
> Date: Fri, 28 Jan 2022 10:58:40 -0500
> Subject: [PATCH] dm: revert partial fix for redundant bio-based IO accounting
> 
> Reverts a1e1cb72d9649 ("dm: fix redundant IO accounting for bios that
> need splitting") because it was too narrow in scope (only addressed
> redundant 'sectors[]' accounting and not ios, nsecs[], etc).
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
> Link: https://lore.kernel.org/r/20220128155841.39644-3-snitzer@redhat.com
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
> 
> diff --git a/drivers/md/dm.c b/drivers/md/dm.c
> index c0ae8087c602..9849114b3c08 100644
> --- a/drivers/md/dm.c
> +++ b/drivers/md/dm.c
> @@ -1442,9 +1442,6 @@ static void init_clone_info(struct clone_info *ci, struct mapped_device *md,
>  	ci->sector = bio->bi_iter.bi_sector;
>  }
>  
> -#define __dm_part_stat_sub(part, field, subnd)	\
> -	(part_stat_get(part, field) -= (subnd))
> -
>  /*
>   * Entry point to split a bio into clones and submit them to the targets.
>   */
> @@ -1480,18 +1477,6 @@ static void __split_and_process_bio(struct mapped_device *md,
>  						  GFP_NOIO, &md->queue->bio_split);
>  			ci.io->orig_bio = b;
>  
> -			/*
> -			 * Adjust IO stats for each split, otherwise upon queue
> -			 * reentry there will be redundant IO accounting.
> -			 * NOTE: this is a stop-gap fix, a proper fix involves
> -			 * significant refactoring of DM core's bio splitting
> -			 * (by eliminating DM's splitting and just using bio_split)
> -			 */
> -			part_stat_lock();
> -			__dm_part_stat_sub(dm_disk(md)->part0,
> -					   sectors[op_stat_group(bio_op(bio))], ci.sector_count);
> -			part_stat_unlock();
> -
>  			bio_chain(b, bio);
>  			trace_block_split(b, bio->bi_iter.bi_sector);
>  			submit_bio_noacct(bio);
> 


      reply	other threads:[~2022-02-08 22:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-29 13:31 FAILED: patch "[PATCH] dm: revert partial fix for redundant bio-based IO accounting" failed to apply to 5.4-stable tree gregkh
2022-02-08 22:00 ` Mike Snitzer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YgLn/Xax8fzFY5Z+@redhat.com \
    --to=snitzer@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=gregkh@linuxfoundation.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).