All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hitoshi Mitake <mitake.hitoshi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Ryusuke Konishi
	<konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
Cc: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v3] nilfs2: add a tracepoint for tracking stage transition of segment construction
Date: Sun, 14 Sep 2014 16:20:33 +0900	[thread overview]
Message-ID: <CAE1WaKLSHTBNFpOkv8_brjO4He94yC-4cxBXJd+MpoYDrmmxcA@mail.gmail.com> (raw)
In-Reply-To: <20140914.130913.1849218538834852743.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>

On Sun, Sep 14, 2014 at 1:09 PM, Ryusuke Konishi
<konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org> wrote:
> On Sun, 14 Sep 2014 00:14:36 +0900, Mitake Hitoshi wrote:
>> This patch adds a tracepoint for tracking stage transition of block
>> collection in segment construction. With the tracepoint, we can
>> analysis the behavior of segment construction in depth. It would be
>> useful for bottleneck detection and debugging, etc.
>>
>> The tracepoint is created with the standard trace API of linux (like
>> ext3, ext4, f2fs and btrfs). So we can analysis with existing tools
>> easily. Of course, more detailed analysis will be possible if we can
>> create nilfs specific analysis tools.
>>
>> Below is an example of event dump with Brendan Gregg's perf-tools
>> (https://github.com/brendangregg/perf-tools). Time consumption between
>> each stage can be obtained.
>>
>> $ sudo bin/tpoint nilfs2:nilfs2_collection_stage_transition
>> Tracing nilfs2:nilfs2_collection_stage_transition. Ctrl-C to end.
>>         segctord-14875 [003] ...1 28311.067794: nilfs2_collection_stage_transition: sci = ffff8800ce6de000, stage = ST_INIT
>>         segctord-14875 [003] ...1 28311.068139: nilfs2_collection_stage_transition: sci = ffff8800ce6de000, stage = ST_GC
>>         segctord-14875 [003] ...1 28311.068139: nilfs2_collection_stage_transition: sci = ffff8800ce6de000, stage = ST_FILE
>>         segctord-14875 [003] ...1 28311.068486: nilfs2_collection_stage_transition: sci = ffff8800ce6de000, stage = ST_IFILE
>>         segctord-14875 [003] ...1 28311.068540: nilfs2_collection_stage_transition: sci = ffff8800ce6de000, stage = ST_CPFILE
>>         segctord-14875 [003] ...1 28311.068561: nilfs2_collection_stage_transition: sci = ffff8800ce6de000, stage = ST_SUFILE
>>         segctord-14875 [003] ...1 28311.068565: nilfs2_collection_stage_transition: sci = ffff8800ce6de000, stage = ST_DAT
>>         segctord-14875 [003] ...1 28311.068573: nilfs2_collection_stage_transition: sci = ffff8800ce6de000, stage = ST_SR
>>         segctord-14875 [003] ...1 28311.068574: nilfs2_collection_stage_transition: sci = ffff8800ce6de000, stage = ST_DONE
>>
>> For capturing transition correctly, this patch adds wrappers for the
>> member scnt of nilfs_cstage. With this change, every transition of the
>> stage can produce trace event in a correct manner.
>>
>> Of course the tracepoint added by this patch is very limited, so we
>> need to add more points for detailed analysis. This patch is something
>> like demonstration. If this concept is acceptable for the nilfs
>> community, I'd like to add more tracepoints and prepare analysis
>> tools.
>>
>> Signed-off-by: Hitoshi Mitake <mitake.hitoshi-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
>> ---
>>  fs/nilfs2/segment.c           | 71 +++++++++++++++++++++++++++++++------------
>>  fs/nilfs2/segment.h           |  3 +-
>>  include/trace/events/nilfs2.h | 50 ++++++++++++++++++++++++++++++
>>  3 files changed, 103 insertions(+), 21 deletions(-)
>>  create mode 100644 include/trace/events/nilfs2.h
>>
>> v3: undo rename
>>
>> v2: correct the email address of author
>>
> <snip>
>
> Looks good.  I pushed out this patch as "tracepoints" branch of
> nilfs2.git[1].
>
> If you hope it to be sent to upstream separately at this time, please
> let me know.  (In that case, the following description should be
> revised to be ready for mainline merge).
>
>> Of course the tracepoint added by this patch is very limited, so we
>> need to add more points for detailed analysis. This patch is something
>> like demonstration. If this concept is acceptable for the nilfs
>> community, I'd like to add more tracepoints and prepare analysis
>> tools.
>
> Otherwise, I'll keep it in the tracepoints branch for now.

Thanks a lot for your review and pushing. The change for tracepoints
doesn't need to be sent to upstream immediately. I'll enhance the
feature for a while on the tracepoints branch.

Thanks,
Hitoshi

>
> [1] https://github.com/konis/nilfs2.git
>
> Thanks,
> Ryusuke Konishi
>
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2014-09-14  7:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-13 15:14 [PATCH v3] nilfs2: add a tracepoint for tracking stage transition of segment construction Hitoshi Mitake
     [not found] ` <1410621276-29867-1-git-send-email-mitake.hitoshi-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-09-14  4:09   ` Ryusuke Konishi
     [not found]     ` <20140914.130913.1849218538834852743.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-09-14  7:20       ` Hitoshi Mitake [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=CAE1WaKLSHTBNFpOkv8_brjO4He94yC-4cxBXJd+MpoYDrmmxcA@mail.gmail.com \
    --to=mitake.hitoshi-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org \
    --cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.