From: Shaohua Li Date: Fri, 18 Nov 2016 17:44:08 +0000 (-0800) Subject: md: add blktrace event for writes to superblock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=504634f60f463e73e7d58c6810a04437da942dba;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: NeilBrown --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 1f1c7f007b68..d3cef771e422 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -64,6 +64,7 @@ #include #include #include +#include #include "md.h" #include "bitmap.h" #include "md-cluster.h" @@ -2403,6 +2404,8 @@ repeat: 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];