Re: [PATCH] Separate lock events with types

From: Frederic Weisbecker
Date: Tue Apr 06 2010 - 05:45:13 EST

On Tue, Apr 06, 2010 at 10:26:06AM +0200, Peter Zijlstra wrote:
> On Sat, 2010-03-27 at 00:33 +0100, Frederic Weisbecker wrote:
> > So if we store the lock type in the lockdep_map, we can just dump
> > the type on lock class initialization:
> >
> > - on register_lock_class
> > - on event injection to catchup with lock that have already registered
> >
> > That's what does my tree perf/inject (minus the lock type), but this
> > all require a redesign, in both ftrace and perf sides.
> >
> Right, and I don't like to bloat dep_map for no reason. I still think
> all this lock type stuff is a waste of time.

Again, it makes no sense to mix up reports of spinlocks, rwlocks, mutexes
or whatever together in the same latency report.

I agree with you that such report makes no sense if you don't look at
the code and then find the nature of the locks on the deeper overview.

But the first overview is going to be unhelpful at best if you have
everything in the same linear report.

You'll naturally find the mutexes first reporting the worst latencies,
then rwsem, then the spinlocks, then the read rwlocks (read) at the end
of the list (depending on the cases).

And yet their latency intervals have utter different meanings. You can't
provide a taste report that mixes beers and wines qualities based on the
same magnitudes.

I really believe perf lock is going to suck at best without this.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at