From: Ingo Molnar <mingo@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Ian Rogers <irogers@google.com>,
linux-perf-users@vger.kernel.org, Will Deacon <will@kernel.org>,
Waiman Long <longman@redhat.com>,
Boqun Feng <boqun.feng@gmail.com>,
Davidlohr Bueso <dave@stgolabs.net>
Subject: Re: [PATCHSET 0/6] perf lock: Add contention subcommand (v1)
Date: Wed, 3 Aug 2022 11:51:14 +0200 [thread overview]
Message-ID: <YupFEkzCDxpFUyeD@gmail.com> (raw)
In-Reply-To: <20220721043644.153718-1-namhyung@kernel.org>
* Namhyung Kim <namhyung@kernel.org> wrote:
> Hello,
>
> It's to add a new subcommand 'contention' (shortly 'con') to perf lock.
>
> The new subcommand is to handle the new lock:contention_{begin,end}
> tracepoints and shows lock type and caller address like below:
>
> $ perf lock contention
> contended total wait max wait avg wait type caller
>
> 238 1.41 ms 29.20 us 5.94 us spinlock update_blocked_averages+0x4c
> 1 902.08 us 902.08 us 902.08 us rwsem:R do_user_addr_fault+0x1dd
> 81 330.30 us 17.24 us 4.08 us spinlock _nohz_idle_balance+0x172
> 2 89.54 us 61.26 us 44.77 us spinlock do_anonymous_page+0x16d
> 24 78.36 us 12.27 us 3.27 us mutex pipe_read+0x56
> 2 71.58 us 59.56 us 35.79 us spinlock __handle_mm_fault+0x6aa
> 6 25.68 us 6.89 us 4.28 us spinlock do_idle+0x28d
> 1 18.46 us 18.46 us 18.46 us rtmutex exec_fw_cmd+0x21b
> 3 15.25 us 6.26 us 5.08 us spinlock tick_do_update_jiffies64+0x2c
> ...
Wouldn't it also be useful to display a lock contention percentage value,
the ratio of fastpath vs. contended/wait events?
That's usually the first-approximation metric to see how contended
different locks are, and the average wait time quantifies it.
Thanks,
Ingo
next prev parent reply other threads:[~2022-08-03 9:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-21 4:36 [PATCHSET 0/6] perf lock: Add contention subcommand (v1) Namhyung Kim
2022-07-21 4:36 ` [PATCH 1/6] perf lock: Fix a copy-n-paste bug Namhyung Kim
2022-07-21 19:09 ` Arnaldo Carvalho de Melo
2022-07-21 4:36 ` [PATCH 2/6] perf lock: Add flags field in the lock_stat Namhyung Kim
2022-07-21 4:36 ` [PATCH 3/6] perf lock: Add lock aggregation enum Namhyung Kim
2022-07-21 19:02 ` Arnaldo Carvalho de Melo
2022-07-21 19:05 ` Arnaldo Carvalho de Melo
2022-07-25 16:56 ` Namhyung Kim
2022-07-21 4:36 ` [PATCH 4/6] perf lock: Add 'contention' subcommand Namhyung Kim
2022-07-21 4:36 ` [PATCH 5/6] perf lock: Add -k and -F options to " Namhyung Kim
2022-07-21 4:36 ` [PATCH 6/6] perf lock: Support -t option for " Namhyung Kim
2022-08-03 9:51 ` Ingo Molnar [this message]
2022-08-04 4:55 ` [PATCHSET 0/6] perf lock: Add contention subcommand (v1) Namhyung Kim
2022-08-04 8:37 ` Ingo Molnar
2022-08-04 21:02 ` Namhyung Kim
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=YupFEkzCDxpFUyeD@gmail.com \
--to=mingo@kernel.org \
--cc=acme@kernel.org \
--cc=boqun.feng@gmail.com \
--cc=dave@stgolabs.net \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=longman@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=will@kernel.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.