linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Shaohua Li <shli@kernel.org>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH v2] md: add block tracing for bio_remapping
Date: Mon, 21 Nov 2016 15:00:37 +1100	[thread overview]
Message-ID: <87a8cteb2y.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20161118175005.dodwcprytycwyuyq@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 2244 bytes --]

On Sat, Nov 19 2016, Shaohua Li wrote:

> On Fri, Nov 18, 2016 at 09:26:22AM -0800, Shaohua Li wrote:
>> On Fri, Nov 18, 2016 at 01:22:04PM +1100, Neil Brown wrote:
>> > 
>> > The block tracing infrastructure (accessed with blktrace/blkparse)
>> > supports the tracing of mapping bios from one device to another.
>> > This is currently used when a bio in a partition is mapped to the
>> > whole device, when bios are mapped by dm, and for mapping in md/raid5.
>> > Other md personalities do not include this tracing yet, so add it.
>> > 
>> > When a read-error is detected we redirect the request to a different device.
>> > This could justifiably be seen as a new mapping for the originial bio,
>> > or a secondary mapping for the bio that errors.  This patch uses
>> > the second option.
>> > 
>> > When md is used under dm-raid, the mappings are not traced as we do
>> > not have access to the block device number of the parent.
>> 
>> thanks, applied patch 1, 3, 4.
>
> BTW, I added below patch
>

Yes, that looks good.  Thanks!

NeilBrown

>
> commit 504634f60f463e73e7d58c6810a04437da942dba
> Author: Shaohua Li <shli@fb.com>
> Date:   Fri Nov 18 09:44:08 2016 -0800
>
>     md: add blktrace event for writes to superblock
>     
>     superblock write is an expensive operation. With raid5-cache, it can be called
>     regularly. Tracing to help performance debug.
>     
>     Signed-off-by: Shaohua Li <shli@fb.com>
>     Cc: NeilBrown <neilb@suse.com>
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 1f1c7f0..d3cef77 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -64,6 +64,7 @@
>  #include <linux/raid/md_p.h>
>  #include <linux/raid/md_u.h>
>  #include <linux/slab.h>
> +#include <trace/events/block.h>
>  #include "md.h"
>  #include "bitmap.h"
>  #include "md-cluster.h"
> @@ -2403,6 +2404,8 @@ void md_update_sb(struct mddev *mddev, int force_change)
>  	pr_debug("md: updating %s RAID superblock on device (in sync %d)\n",
>  		 mdname(mddev), mddev->in_sync);
>  
> +	if (mddev->queue)
> +		blk_add_trace_msg(mddev->queue, "md md_update_sb");
>  	bitmap_update_sb(mddev->bitmap);
>  	rdev_for_each(rdev, mddev) {
>  		char b[BDEVNAME_SIZE];

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

      reply	other threads:[~2016-11-21  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18  2:22 [PATCH v2] md: add block tracing for bio_remapping NeilBrown
2016-11-18 17:26 ` Shaohua Li
2016-11-18 17:50   ` Shaohua Li
2016-11-21  4:00     ` NeilBrown [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=87a8cteb2y.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=shli@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).