public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Jason Baron <jbaron@redhat.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Bill Huey <billh@gnuppy.monkey.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH 3/7] lockdep: lock contention tracking
Date: Wed, 23 May 2007 19:23:31 +0200	[thread overview]
Message-ID: <1179941011.7019.103.camel@twins> (raw)
In-Reply-To: <Pine.LNX.4.64.0705231159310.22023@dhcp83-20.boston.redhat.com>

On Wed, 2007-05-23 at 12:11 -0400, Jason Baron wrote:
> On Wed, 23 May 2007, Peter Zijlstra wrote:
> 
> > On Wed, 2007-05-23 at 10:40 -0400, Jason Baron wrote:
> > > On Wed, 23 May 2007, Peter Zijlstra wrote:
> > > 
> > > > Count lock contention events per lock class. Additionally track the first four
> > > > callsites that resulted in the contention.
> > > > 
> > > 
> > > I think that we need the total number of locking calls, not just the total 
> > > number of *contended* locking calls, in order to make the data 
> > > significant. Same for waittime. Yes, this pollutes the fastpath. In the 
> > > contention case, its one extra addition, and for the waittime, its a call 
> > > the sched_clock(). I don't think that's too much to pay for much more 
> > > meaningful data.
> > 
> > The holdtime statistics add these numbers.
> > 
> 
> ok, i see what you are saying...however, the 'waittime' statistic as 
> implemented, is only recorded when we don't get the lock immediately. 
> Thus, it's really measuring the waittime when there is lock contention. I 
> understand that in the non-contended case we are only talking a a few 
> cycles, but the fact that the non-contended case is not counted as another 
> waittime of even zero length (so no measurement is required), might skew 
> the stats a bit. For examples, if there was a lock that was almost never 
> contended but one time happened to be contended for a long time, its 
> average wait time would look really high.

I'm not seeing how or why this is a problem. The number of contentions
is reported on the same line, so it should be obvious.

Your definition of wait-time is also obtainable from the numbers, one
would just divide waittime-total by acquisitions, instead of
contentions.





  reply	other threads:[~2007-05-23 17:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-23  9:57 [PATCH 0/7] lock contention tracking -v2 Peter Zijlstra
2007-05-23  9:57 ` [PATCH 1/7] fix raw_spinlock_t vs lockdep Peter Zijlstra
2007-05-23  9:57 ` [PATCH 2/7] lockdep: isolate lock graph walking Peter Zijlstra
2007-05-23  9:57 ` [PATCH 3/7] lockdep: lock contention tracking Peter Zijlstra
2007-05-23 14:40   ` Jason Baron
2007-05-23 15:07     ` Peter Zijlstra
2007-05-23 16:11       ` Jason Baron
2007-05-23 17:23         ` Peter Zijlstra [this message]
2007-05-23 17:24           ` Jason Baron
2007-05-23  9:57 ` [PATCH 4/7] lockdep: add waittime to the lock statistics Peter Zijlstra
2007-05-23  9:57 ` [PATCH 5/7] lockdep: add holdtime " Peter Zijlstra
2007-05-23  9:57 ` [PATCH 6/7] lockdep: runtime configure prove_locking and lock_stat Peter Zijlstra
2007-05-23  9:57 ` [PATCH 7/7] lockdep: scalable statistics Peter Zijlstra
2007-05-23 10:33 ` [PATCH 0/7] lock contention tracking -v2 Ingo Molnar
2007-05-23 21:57   ` Bill Huey
2007-05-23 15:10 ` [PATCH 8/7] new output format Peter Zijlstra

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=1179941011.7019.103.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=billh@gnuppy.monkey.org \
    --cc=hch@infradead.org \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox