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@xxxxxx> > 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@xxxxxx> > Cc: NeilBrown <neilb@xxxxxxxx> > > 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:
signature.asc
Description: PGP signature