[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1253022207.4754.1.camel@penberg-laptop>
Date: Tue, 15 Sep 2009 16:43:27 +0300
From: Pekka Enberg <penberg@...helsinki.fi>
To: rostedt@...dmis.org
Cc: Nitin Gupta <ngupta@...are.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Hugh Dickins <hugh.dickins@...cali.co.uk>,
Ed Tomlinson <edt@....ca>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, linux-mm-cc@...top.org,
Ingo Molnar <mingo@...e.hu>,
"Frédéric Weisbecker" <fweisbec@...il.com>
Subject: Re: [PATCH 2/4] virtual block device driver (ramzswap)
Hi Steve,
On Tue, 2009-09-15 at 09:14 -0400, Steven Rostedt wrote:
> > >>> +
> > >>> + trace_mark(ramzswap_lock_wait, "ramzswap_lock_wait");
> > >>> + mutex_lock(&rzs->lock);
> > >>> + trace_mark(ramzswap_lock_acquired, "ramzswap_lock_acquired");
> > >>
> > >> Hmm? What's this? I don't think you should be doing ad hoc
> > >> trace_mark() in driver code.
> > >
> > > This is not ad hoc. It is to see contention over this lock which I believe is a
> > > major bottleneck even on dual-cores. I need to keep this to measure improvements
> > > as I gradually make this locking more fine grained (using per-cpu buffer etc).
> >
> > It is ad hoc. Talk to the ftrace folks how to do it properly. I'd keep
> > those bits out-of-tree until the issue is resolved, really.
>
> Yes, trace_mark is deprecated. You want to use TRACE_EVENT. See how gfs2
> does it in:
>
> fs/gfs2/gfs2_trace.h
>
> and it is well documented in
> samples/trace_events/trace-events-samples.[ch]
Does it really make sense to add special-case tracing in driver code to
profile lock contention for a _single mutex_?
Pekka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists