Re: [PATCH] lock stat for -rt 2.6.20-rc2-rt2 [was Re: 2.6.19-rt14 slowdown compared to 2.6.19]

From: Ingo Molnar
Date: Sat Dec 30 2006 - 06:23:10 EST



* Bill Huey <billh@xxxxxxxxxxxxxxxxx> wrote:

> On Tue, Dec 26, 2006 at 04:51:21PM -0800, Chen, Tim C wrote:
> > Ingo Molnar wrote:
> > > If you'd like to profile this yourself then the lowest-cost way of
> > > profiling lock contention on -rt is to use the yum kernel and run the
> > > attached trace-it-lock-prof.c code on the box while your workload is
> > > in 'steady state' (and is showing those extended idle times):
> > >
> > > ./trace-it-lock-prof > trace.txt
> >
> > Thanks for the pointer. Will let you know of any relevant traces.
>
> Tim,
> http://mmlinux.sourceforge.net/public/patch-2.6.20-rc2-rt2.lock_stat.patch
>
> You can also apply this patch to get more precise statistics down to
> the lock. [...]

your patch looks pretty ok to me in principle. A couple of suggestions
to make it more mergable:

- instead of BUG_ON()s please use DEBUG_LOCKS_WARN_ON() and make sure
the code is never entered again if one assertion has been triggered.
Pass down a return result of '0' to signal failure. See
kernel/lockdep.c about how to do this. One thing we dont need are
bugs in instrumentation bringing down a machine.

- remove dead (#if 0) code

- Documentation/CodingStyle compliance - the code is not ugly per se
but still looks a bit 'alien' - please try to make it look Linuxish,
if i apply this we'll probably stick with it forever. This is the
major reason i havent applied it yet.

- the xfs/wrap_lock change looks bogus - the lock is initialized
already. What am i missing?

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/