lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y+OlploNJlan/Gkm@kernel.org>
Date:   Wed, 8 Feb 2023 10:37:42 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     Jiri Olsa <jolsa@...nel.org>, Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Ian Rogers <irogers@...gle.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        linux-perf-users@...r.kernel.org, Will Deacon <will@...nel.org>,
        Waiman Long <longman@...hat.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Davidlohr Bueso <dave@...olabs.net>,
        Song Liu <song@...nel.org>, Hao Luo <haoluo@...gle.com>,
        bpf@...r.kernel.org
Subject: Re: [RFC/PATCH 0/3] perf lock contention: Track lock owner (v2)

Em Mon, Feb 06, 2023 at 04:24:00PM -0800, Namhyung Kim escreveu:
> Hello,
> 
> When there're many lock contentions in the system, people sometimes
> want to know who caused the contention, IOW who's the owner of the
> locks.
> 
> This patchset adds -o/--lock-owner option to track the owner info
> if it's available.  Right now, it supports mutex and rwsem as they
> have the owner fields in themselves.  Please see the patch 2 for the
> details.
> 
> Changes in v2)
>  * fix missing callstacks
>  * support old rwsem type with recent clang (>= 15.0)
> 
> The patch 1 is a fix for missing callstacks and the patch 2 is the
> main change.  The patch 3 adds support for old kernels when compiler
> supports a recent builtin to check field type in a struct (Thanks
> to Hao).
> 
> Example output (for mutex only):
> 
>   $ sudo ./perf lock con -abo -Y mutex -- ./perf bench sched pipe
>   # Running 'sched/pipe' benchmark:
>   # Executed 1000000 pipe operations between two processes
> 
>        Total time: 4.910 [sec]
> 
>          4.910435 usecs/op
>            203647 ops/sec
>    contended   total wait     max wait     avg wait          pid   owner
> 
>            2     15.50 us      8.29 us      7.75 us      1582852   sched-pipe
>            7      7.20 us      2.47 us      1.03 us           -1   Unknown
>            1      6.74 us      6.74 us      6.74 us      1582851   sched-pipe
> 
> You can get it from 'perf/lock-owner-v2' branch in
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git

Thanks, applied.

- Arnaldo

 
> Thanks,
> Namhyung
> 
> Namhyung Kim (3):
>   perf lock contention: Fix to save callstack for the default modified
>   perf lock contention: Add -o/--lock-owner option
>   perf lock contention: Support old rw_semaphore type
> 
>  tools/perf/Documentation/perf-lock.txt        |  5 +
>  tools/perf/builtin-lock.c                     | 52 +++++++++--
>  tools/perf/util/bpf_lock_contention.c         |  1 +
>  .../perf/util/bpf_skel/lock_contention.bpf.c  | 91 ++++++++++++++++++-
>  tools/perf/util/lock-contention.h             |  1 +
>  5 files changed, 136 insertions(+), 14 deletions(-)
> 
> 
> base-commit: 17f248aa8664ff5b3643491136283e73b5c18166
> -- 
> 2.39.1.519.gcb327c4b5f-goog
> 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ