linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v3 0/2] btrfs: trace: Trace events for btrfs tree locking
Date: Mon, 15 Apr 2019 16:28:55 +0200	[thread overview]
Message-ID: <20190415142854.GH3476@twin.jikos.cz> (raw)
In-Reply-To: <20190415131525.20274-1-wqu@suse.com>

On Mon, Apr 15, 2019 at 09:15:23PM +0800, Qu Wenruo wrote:
> This branch can be fetched from github:
> https://github.com/adam900710/linux/tree/trace_locking
> Which is based on v5.1-rc4 tag.
> 
> This patchset will introduce the following trace events for corresponding
> functions:
>   btrfs_tree_lock			(sleepable)
>   btrfs_tree_unlock
>   btrfs_tree_read_lock			(sleepable)
>   btrfs_tree_read_unlock
>   btrfs_tree_read_unlock_blocking
>   btrfs_set_lock_blocking_read
>   btrfs_set_lock_blocking_write
>   btrfs_clear_lock_blocking_read
>   btrfs_clear_lock_blocking_write
>   btrfs_try_tree_read_lock
>   btrfs_try_tree_write_lock
>   btrfs_tree_read_lock_atomic
> 
> The two sleepable ones will have extra info like start_ns, end_ns,
> diff_ns.
> Those two can be specially useful for tree lock wait time.
> There is tool to utilize those two events already:
> https://github.com/adam900710/btrfs-profiler/blob/master/tree_lock_wait.py
> 
> The non-sleepable can be useful for possible user space based lock
> leakage/dead lock detector.
> 
> Changelog:
> v2:
> - Hide all ktime_get_ns() call out of trace events
>   So there will be no overhead if trace events are not enabled.
> 
> v3:
> - More output for human to take a glance
> - More trace events for later bcc usage
>   Like lock leakage and deadlock detection.

V3 looks good to me, thanks. The enhanced output of the sleepable lock
is still sane.

      parent reply	other threads:[~2019-04-15 14:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15 13:15 [PATCH v3 0/2] btrfs: trace: Trace events for btrfs tree locking Qu Wenruo
2019-04-15 13:15 ` [PATCH v3 1/2] btrfs: trace: Introduce trace events for sleepable tree lock Qu Wenruo
2019-04-15 13:15 ` [PATCH v3 2/2] btrfs: trace: Introduce trace events for all btrfs tree locking events Qu Wenruo
2019-04-15 14:28 ` David Sterba [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=20190415142854.GH3476@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.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;
as well as URLs for NNTP newsgroup(s).