All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Campos <rodrigo@sdfg.com.ar>
To: Junjie Qian <junjie.qian@yahoo.com>
Cc: David Ahern <dsahern@gmail.com>,
	"linux-perf-users@vger.kernel.org"
	<linux-perf-users@vger.kernel.org>
Subject: Re: Profile the waiting time for lock or lock stats for one application
Date: Mon, 3 Mar 2014 16:23:54 +0000	[thread overview]
Message-ID: <20140303162354.GA30567@sdfg.com.ar> (raw)
In-Reply-To: <1393863072.34363.YahooMailNeo@web124906.mail.ne1.yahoo.com>

On Mon, Mar 03, 2014 at 08:11:12AM -0800, Junjie Qian wrote:
> Hi,
> 
> Really appreciate your help on this issue!
> 1. using root solve my problem with "perf lock", thank you very much!
> 2. about the discussion on locks in user-space. I discussed this with my advisor, and found that lock contention does not mean waiting time or idle cpu-cycles sometime, for example, spin-lock in user-space that all threads/cores are still running but useless work and this cannot be detected as either system lock or idle-cpu-cycles. 

Yeah, with mutexes usually there is some spinning before waiting for the lock.

> The way, I am trying to do this, now is insert the counter into the application layer once the lock happens start the counting and I prepare to monitor the threads in queue to detect the lock.

clock_gettime() with some clocks is implemented as a VDSO, so it should be
pretty light to get that info if you need it.
And thread local variables can be very useful too probably :)

> I will let you know if I have any updates on this.

Great :)




Thanks a lot,
Rodrigo

      reply	other threads:[~2014-03-03 16:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25 18:13 Profile the waiting time for lock or lock stats for one application Junjie Qian
2014-02-27  3:17 ` Junjie Qian
2014-02-27  3:29   ` David Ahern
2014-02-28 20:00     ` Junjie Qian
2014-02-28 18:43 ` Rodrigo Campos
2014-03-01 15:30   ` David Ahern
2014-03-01 16:03     ` Rodrigo Campos
2014-03-03 16:11       ` Junjie Qian
2014-03-03 16:23         ` Rodrigo Campos [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=20140303162354.GA30567@sdfg.com.ar \
    --to=rodrigo@sdfg.com.ar \
    --cc=dsahern@gmail.com \
    --cc=junjie.qian@yahoo.com \
    --cc=linux-perf-users@vger.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.