All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>,
	linux-kernel@vger.kernel.org, mingo@elte.hu, paulus@samba.org,
	tglx@linutronix.de, gregkh@suse.de
Subject: Re: [PATCH] Add type of locks to lock trace events
Date: Fri, 29 Jan 2010 23:12:54 +0100	[thread overview]
Message-ID: <20100129221252.GA5052@nowhere> (raw)
In-Reply-To: <1264786865.24455.22.camel@laptop>

On Fri, Jan 29, 2010 at 06:41:05PM +0100, Peter Zijlstra wrote:
> Sure, never claimed otherwise, but:
>  1) if you're looking at lock behaviour you should also look at the code
>     otherwise you have no context to place the contention behaviour in.
> 
>  2) exactly because these hold/acquire times differ so much its hard to
>     mistake mistake them for anything else.
> 
> The concern I have is adding the storage (avoided by not doing it at
> init like you suggested) and the event size overhead. Jens' report
> confirms that we need to be very careful here, because lock sites are
> very high frequent.
> 
> So again, _why_? If you're looking at these things its easy (and I'd say
> rather crucial) to look up the code.
> 
> There simply is no point in looking at these stats if you're not also
> going to look at the code. If you're looking at them in a quick
> diagnostic way, then the difference against the baseline is important.



Ok, looking at the code is mandatory if you want to enter into any
detail. But before going into this step, you need a first glance, an
overview, unless you are targeting a very precise lock, in which case
you need to use filters and only trace this one.

Now say you want to find the locks in the kernel that are not fine
grained, taken for too long, in average or punctually, then mixing
up mutexes and spinlocks is not going to be helpful at all, quite
the opposite, you are going to miss very interesting things.

In this latter case you really want to separate by family of locks
so that you can immediately point out which lock is badly set up.

See? This is really a matter of overview, IMO this is required if
you want perf lock to be useful. And this is not going to bring any
overhead if we do that from lock init events.

So we can have one report for mutexes, one for spinlocks, one for
rwlocks (distinguishing read/write locks), etc...

We can even ask to report only spinlocks, mutexes, and that by filters.


  reply	other threads:[~2010-01-29 22:13 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-16  3:28 [PATCH 1/2] perf: Add util/include/linuxhash.h to include hash.h of kernel Hitoshi Mitake
2009-12-16  3:28 ` [PATCH 2/2] perf lock: Fix output of tracing lock events Hitoshi Mitake
2009-12-16  8:19   ` [tip:perf/lock] " tip-bot for Hitoshi Mitake
2009-12-17  8:50   ` [PATCH 2/2] " Ingo Molnar
2009-12-17  9:24   ` Peter Zijlstra
2009-12-17 10:09     ` Ingo Molnar
2009-12-17 10:26       ` Peter Zijlstra
2009-12-17 10:51         ` Ingo Molnar
2009-12-26 13:43     ` Hitoshi Mitake
2009-12-28 10:01       ` Peter Zijlstra
2009-12-31 13:24         ` Hitoshi Mitake
2010-01-07 10:38           ` Hitoshi Mitake
2010-01-07 10:39             ` [PATCH 0/5] lockdep: Add information of file and line to lockdep_map Hitoshi Mitake
2010-01-13  9:52               ` Peter Zijlstra
2010-01-13 10:09                 ` Ingo Molnar
2010-01-16 13:01                 ` Hitoshi Mitake
2010-01-18  7:20                   ` Peter Zijlstra
2010-01-26  5:56                     ` [PATCH] Add type of locks to lock trace events Hitoshi Mitake
2010-01-28 10:21                       ` Peter Zijlstra
2010-01-29 17:29                         ` Frederic Weisbecker
2010-01-29 17:41                           ` Peter Zijlstra
2010-01-29 22:12                             ` Frederic Weisbecker [this message]
2010-02-24  9:02                               ` [PATCH] Separate lock events with types Hitoshi Mitake
2010-03-26 23:33                                 ` Frederic Weisbecker
2010-04-05 10:37                                   ` Hitoshi Mitake
2010-04-06  8:26                                   ` Peter Zijlstra
2010-04-06  9:44                                     ` Frederic Weisbecker
2010-01-07 10:39             ` [PATCH 1/5] lockdep: Add file and line to initialize sequence of spin and rw lock Hitoshi Mitake
2010-01-07 10:39             ` [PATCH 2/5] lockdep: Add file and line to initialize sequence of rwsem Hitoshi Mitake
2010-01-07 10:39             ` [PATCH 3/5] " Hitoshi Mitake
2010-01-07 10:39             ` [PATCH 4/5] lockdep: Add file and line to initialize sequence of mutex Hitoshi Mitake
2010-01-07 10:39             ` [PATCH 5/5] lockdep: Fix the way to initialize class_mutex for information of file and line Hitoshi Mitake
2010-01-13 10:00               ` Ingo Molnar
2010-01-13 23:17                 ` Greg KH
2010-01-13 23:19                   ` Greg KH
2010-01-16 12:55                     ` Hitoshi Mitake
2009-12-16  8:18 ` [tip:perf/lock] perf: Add util/include/linuxhash.h to include hash.h of kernel tip-bot for Hitoshi Mitake

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=20100129221252.GA5052@nowhere \
    --to=fweisbec@gmail.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mitake@dcl.info.waseda.ac.jp \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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.