All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milian Wolff <milian.wolff@kdab.com>
To: mark.kelly@lexisnexis.com
Cc: linux-perf-users@vger.kernel.org
Subject: Re: spin_lock cause ?
Date: Thu, 02 Jun 2016 11:18:59 +0200	[thread overview]
Message-ID: <2040952.O0UUUUmzi9@agathebauer> (raw)
In-Reply-To: <loom.20160601T204307-459@post.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1870 bytes --]

On Mittwoch, 1. Juni 2016 18:49:01 CEST M Kelly wrote:
> Arnaldo Carvalho de Melo <acme <at> kernel.org> writes:
> > No need for DWARF if you want to know what leads to the spinlock just up
> > to the syscall layer or if your userland components have frame pointers.
> 
> Hi,
> 
> ok, I rebuilt our app using -fno-omit-frame-pointer
> and did the perf record -g and when looking at the
> report output I now see:
> 
>     40.90%  thorslave_mytho  [kernel.kallsyms]                   [k]
> _spin_lock
> 
>             --- _spin_lock
> 
>                |--49.11%-- futex_wake
>                |
>                |          do_futex
>                |          sys_futex
>                |          system_call_fastpath
>                |          __lll_unlock_wake
>                |          
>                |          |--99.81%-- CKeyCursor::gtEqual(char const*,
>                |          |char*, bool)
>                |          |
>                |          |          _ZN16CKeyLevelManager7_lookupEbj.constp
>                |          |          rop.100

<snip>

You are running an older perf, I recommend you rerun the report step and pass 
`-g graph`, the old default of `-g fractal` outputs relative-to-parent numbers 
which is often misleading.

The above already shows that you are suffering from lock contention issues, 
and where from (i.e. CKeyCursor::gtEqual). As the above only shows CPU time 
spent, I can only recommend to additionally look at sleep times, e.g. via 

https://perf.wiki.kernel.org/index.php/Tutorial#Profiling_sleep_times

You can easily put the above commands into a shell helper file, I did this:

https://github.com/milianw/shell-helpers/blob/master/perf-sleep-record

HTH
-- 
Milian Wolff | milian.wolff@kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5903 bytes --]

      parent reply	other threads:[~2016-06-02  9:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-01 17:05 spin_lock cause ? Kelly, Mark (RIS-BCT)
2016-06-01 17:37 ` Milian Wolff
2016-06-01 17:43   ` M Kelly
2016-06-01 18:11     ` Arnaldo Carvalho de Melo
2016-06-01 18:49       ` M Kelly
2016-06-01 18:53         ` Rick Jones
2016-06-01 19:25           ` M Kelly
2016-06-01 20:24             ` Rick Jones
2016-06-01 21:10               ` David Ahern
2016-06-02  9:18         ` Milian Wolff [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=2040952.O0UUUUmzi9@agathebauer \
    --to=milian.wolff@kdab.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.kelly@lexisnexis.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 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.