From: Frederic Weisbecker <fweisbec@gmail.com>
To: Tejun Heo <tj@kernel.org>
Cc: axboe@kernel.dk, mingo@redhat.com, rostedt@goodmis.org,
teravest@google.com, slavapestov@google.com, ctalbott@google.com,
dhsharp@google.com, linux-kernel@vger.kernel.org,
winget@google.com, namhyung@gmail.com
Subject: Re: [RFC PATCHSET take#2] ioblame: IO tracer with origin tracking
Date: Wed, 11 Jan 2012 15:40:14 +0100 [thread overview]
Message-ID: <20120111144012.GB7991@somewhere.redhat.com> (raw)
In-Reply-To: <1326220106-5765-1-git-send-email-tj@kernel.org>
Hi Tejun,
On Tue, Jan 10, 2012 at 10:28:17AM -0800, Tejun Heo wrote:
> Hello, guys.
>
> Even with blktrace and tracepoints, getting insight into the IOs going
> on a system is very challenging. A lot of IO operations happen long
> after the action which triggered the IO finished and the overall
> asynchronous nature of IO operations make it difficult to trace back
> the origin of a given IO.
>
> ioblame is an attempt at providing better visibility into overall IO
> behavior. ioblame hooks into various tracepoints and tries to
> determine who caused any given IO how and charges the IO accordingly.
>
> On each IO completion, ioblame knows who to charge the IO (task), how
> the IO got triggered (stack trace at the point of triggering, be it
> page, inode dirtying or direct IO issue) and various information about
> the IO itself (offset, size, how long it took and so on). ioblame
> exports this information via ioblame:ioblame_io tracepoint.
>
> For more details, please read Documentation/trace/ioblame.txt.
>
> Changes from the last take[L] are,
>
> * Per Namhyung's suggestion, in-kernel statistics gathering stripped
> out. All information is now exported through a tracepoint per each
> IO. This makes a lot of stuff unnecessary and over 1500 lines of
> code have been removed.
>
> * block_bio_complete tracepoint patch will result in duplicate
> BLK_TA_COMPLETE notifications. Namhyung is working on proper
> solution. For now, SOB is removed from the patch.
>
> * Trace filter is no longer used and patches dropped from the series.
>
> * Rebased on top of v3.2.
>
> This patchset contains the following 9 patches.
>
> 0001-block-abstract-disk-iteration-into-disk_iter.patch
> 0002-block-block_bio_complete-tracepoint-was-missing.patch
> 0003-block-add-req-to-bio_-front-back-_merge-tracepoints.patch
> 0004-writeback-move-struct-wb_writeback_work-to-writeback.patch
> 0005-writeback-add-more-tracepoints.patch
> 0006-block-add-block_touch_buffer-tracepoint.patch
> 0007-vfs-add-fcheck-tracepoint.patch
> 0008-stacktrace-implement-save_stack_trace_quick.patch
> 0009-block-trace-implement-ioblame-IO-tracer-with-origin-.patch
>
> 0001-0004 update block layer in preparation.
>
> 0005-0007 add more tracepoints along the IO stack.
>
> 0008 adds nimbler backtrace dump function as ioblame dumps stacktrace
> extremely frequently.
>
> 0009 implements ioblame.
>
> This is still in early stage and I haven't done much performance
> analysis yet. Tentative testing shows it adds ~20% CPU overhead when
> used on memory backed loopback device.
>
> The patches are on top of v3.2 and available in the following git
> branch.
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git review-ioblame
>
> diffstat follows.
>
> Documentation/trace/ioblame.txt | 476 +++++++
> arch/x86/include/asm/stacktrace.h | 2
> arch/x86/kernel/stacktrace.c | 40
> block/blk-core.c | 5
> block/genhd.c | 98 +
> fs/bio.c | 3
> fs/fs-writeback.c | 34
> fs/super.c | 2
> include/linux/blk_types.h | 4
> include/linux/buffer_head.h | 7
> include/linux/fdtable.h | 3
> include/linux/fs.h | 3
> include/linux/genhd.h | 13
> include/linux/ioblame.h | 72 +
> include/linux/stacktrace.h | 6
> include/linux/writeback.h | 18
> include/trace/events/block.h | 70 -
> include/trace/events/vfs.h | 40
> include/trace/events/writeback.h | 113 +
> kernel/stacktrace.c | 6
> kernel/trace/Kconfig | 12
> kernel/trace/Makefile | 1
> kernel/trace/blktrace.c | 2
> kernel/trace/ioblame.c | 2279 ++++++++++++++++++++++++++++++++++++++
I think this has been asked before. So sorry for asking twice.
But I'm wondering why the post processing is made from the kernel. Do you think
it would be possible to pull that out in userspace. We have some nice scripting
framework for post processing of trace events in perf tools for example.
If it's not possible please tell us why. We really would like to avoid adding such
a big piece of code in the tracing subsystem if possible.
Thanks.
> mm/page-writeback.c | 2
> 25 files changed, 3244 insertions(+), 67 deletions(-)
>
> Thanks.
>
> --
> tejun
>
> [L] http://thread.gmane.org/gmane.linux.kernel/1235937
next prev parent reply other threads:[~2012-01-11 14:40 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-10 18:28 [RFC PATCHSET take#2] ioblame: IO tracer with origin tracking Tejun Heo
2012-01-10 18:28 ` [PATCH 1/9] block: abstract disk iteration into disk_iter Tejun Heo
2012-01-10 18:28 ` [PATCH 2/9] block: block_bio_complete tracepoint was missing Tejun Heo
2012-01-11 17:25 ` Steven Rostedt
2012-01-11 17:30 ` Tejun Heo
2012-01-12 0:24 ` Namhyung Kim
2012-01-10 18:28 ` [PATCH 3/9] block: add @req to bio_{front|back}_merge tracepoints Tejun Heo
2012-01-10 18:28 ` [PATCH 4/9] writeback: move struct wb_writeback_work to writeback.h Tejun Heo
2012-01-10 18:28 ` [PATCH 5/9] writeback: add more tracepoints Tejun Heo
2012-01-10 18:28 ` [PATCH 6/9] block: add block_touch_buffer tracepoint Tejun Heo
2012-01-11 17:42 ` Steven Rostedt
2012-01-11 17:58 ` Tejun Heo
2012-01-10 18:28 ` [PATCH 7/9] vfs: add fcheck tracepoint Tejun Heo
2012-01-10 18:28 ` [PATCH 8/9] stacktrace: implement save_stack_trace_quick() Tejun Heo
2012-01-11 16:26 ` Frederic Weisbecker
2012-01-11 16:38 ` Tejun Heo
2012-01-11 17:37 ` Tejun Heo
2012-01-17 2:22 ` Frederic Weisbecker
2012-01-10 18:28 ` [PATCH 9/9] block, trace: implement ioblame - IO tracer with origin tracking Tejun Heo
2012-01-11 0:25 ` Chanho Park
2012-01-11 1:04 ` Tejun Heo
2012-01-11 1:32 ` [PATCH RESEND " Tejun Heo
2012-01-11 6:15 ` Namhyung Kim
2012-01-11 17:06 ` Tejun Heo
2012-01-12 1:05 ` Namhyung Kim
2012-01-12 1:14 ` Tejun Heo
2012-01-12 1:35 ` Namhyung Kim
2012-01-12 1:37 ` Tejun Heo
2012-01-12 1:40 ` Namhyung Kim
2012-01-12 1:41 ` Namhyung Kim
2012-01-12 1:44 ` Tejun Heo
2012-01-12 2:19 ` Namhyung Kim
2012-01-12 2:24 ` Tejun Heo
2012-01-11 18:08 ` Tejun Heo
2012-01-11 14:40 ` Frederic Weisbecker [this message]
2012-01-11 17:02 ` [RFC PATCHSET take#2] ioblame: " Tejun Heo
2012-01-11 22:45 ` David Sharp
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=20120111144012.GB7991@somewhere.redhat.com \
--to=fweisbec@gmail.com \
--cc=axboe@kernel.dk \
--cc=ctalbott@google.com \
--cc=dhsharp@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@gmail.com \
--cc=rostedt@goodmis.org \
--cc=slavapestov@google.com \
--cc=teravest@google.com \
--cc=tj@kernel.org \
--cc=winget@google.com \
/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