<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/kernel/lockdep.c, branch v2.6.31.1</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge branch 'linus' into tracing/core</title>
<updated>2009-05-07T09:17:34+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2009-05-07T09:17:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=44347d947f628060b92449702071bfe1d31dfb75'/>
<id>44347d947f628060b92449702071bfe1d31dfb75</id>
<content type='text'>
Merge reason: tracing/core was on a .30-rc1 base and was missing out on
              on a handful of tracing fixes present in .30-rc5-almost.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Merge reason: tracing/core was on a .30-rc1 base and was missing out on
              on a handful of tracing fixes present in .30-rc5-almost.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lockdep: more robust lockdep_map init sequence</title>
<updated>2009-04-17T16:00:00+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2009-04-17T07:40:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c8a250058656495be02c00de61e26b017c86ef00'/>
<id>c8a250058656495be02c00de61e26b017c86ef00</id>
<content type='text'>
Steven Rostedt reported:

&gt; OK, I think I figured this bug out. This is a lockdep issue with respect
&gt; to tracepoints.
&gt;
&gt; The trace points in lockdep are called all the time. Outside the lockdep
&gt; logic. But if lockdep were to trigger an error / warning (which this run
&gt; did) we might be in trouble. For new locks, like the dentry-&gt;d_lock, that
&gt; are created, they will not get a name:
&gt;
&gt; void lockdep_init_map(struct lockdep_map *lock, const char *name,
&gt;                       struct lock_class_key *key, int subclass)
&gt; {
&gt;         if (unlikely(!debug_locks))
&gt;                 return;
&gt;
&gt; When a problem is found by lockdep, debug_locks becomes false. Thus we
&gt; stop allocating names for locks. This dentry-&gt;d_lock I had, now has no
&gt; name. Worse yet, I have CONFIG_DEBUG_VM set, that scrambles non
&gt; initialized memory. Thus, when the trace point was hit, it had junk for
&gt; the lock-&gt;name, and the machine crashed.

Ah, nice catch. I think we should put at least the name in regardless.

Ensure we at least initialize the trivial entries of the depmap so that
they can be relied upon, even when lockdep itself decided to pack up and
go home.

[ Impact: fix lock tracing after lockdep warnings. ]

Reported-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
LKML-Reference: &lt;1239954049.23397.4156.camel@laptop&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Steven Rostedt reported:

&gt; OK, I think I figured this bug out. This is a lockdep issue with respect
&gt; to tracepoints.
&gt;
&gt; The trace points in lockdep are called all the time. Outside the lockdep
&gt; logic. But if lockdep were to trigger an error / warning (which this run
&gt; did) we might be in trouble. For new locks, like the dentry-&gt;d_lock, that
&gt; are created, they will not get a name:
&gt;
&gt; void lockdep_init_map(struct lockdep_map *lock, const char *name,
&gt;                       struct lock_class_key *key, int subclass)
&gt; {
&gt;         if (unlikely(!debug_locks))
&gt;                 return;
&gt;
&gt; When a problem is found by lockdep, debug_locks becomes false. Thus we
&gt; stop allocating names for locks. This dentry-&gt;d_lock I had, now has no
&gt; name. Worse yet, I have CONFIG_DEBUG_VM set, that scrambles non
&gt; initialized memory. Thus, when the trace point was hit, it had junk for
&gt; the lock-&gt;name, and the machine crashed.

Ah, nice catch. I think we should put at least the name in regardless.

Ensure we at least initialize the trivial entries of the depmap so that
they can be relied upon, even when lockdep itself decided to pack up and
go home.

[ Impact: fix lock tracing after lockdep warnings. ]

Reported-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
LKML-Reference: &lt;1239954049.23397.4156.camel@laptop&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tracing/events: move trace point headers into include/trace/events</title>
<updated>2009-04-15T02:05:43+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-04-14T23:39:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ad8d75fff811a6a230f7f43b05a6483099349533'/>
<id>ad8d75fff811a6a230f7f43b05a6483099349533</id>
<content type='text'>
Impact: clean up

Create a sub directory in include/trace called events to keep the
trace point headers in their own separate directory. Only headers that
declare trace points should be defined in this directory.

Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: Zhao Lei &lt;zhaolei@cn.fujitsu.com&gt;
Cc: Eduard - Gabriel Munteanu &lt;eduard.munteanu@linux360.ro&gt;
Cc: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Impact: clean up

Create a sub directory in include/trace called events to keep the
trace point headers in their own separate directory. Only headers that
declare trace points should be defined in this directory.

Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: Zhao Lei &lt;zhaolei@cn.fujitsu.com&gt;
Cc: Eduard - Gabriel Munteanu &lt;eduard.munteanu@linux360.ro&gt;
Cc: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tracing: create automated trace defines</title>
<updated>2009-04-14T16:57:28+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-04-10T13:36:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a8d154b009168337494fbf345671bab74d3e4b8b'/>
<id>a8d154b009168337494fbf345671bab74d3e4b8b</id>
<content type='text'>
This patch lowers the number of places a developer must modify to add
new tracepoints. The current method to add a new tracepoint
into an existing system is to write the trace point macro in the
trace header with one of the macros TRACE_EVENT, TRACE_FORMAT or
DECLARE_TRACE, then they must add the same named item into the C file
with the macro DEFINE_TRACE(name) and then add the trace point.

This change cuts out the needing to add the DEFINE_TRACE(name).
Every file that uses the tracepoint must still include the trace/&lt;type&gt;.h
file, but the one C file must also add a define before the including
of that file.

 #define CREATE_TRACE_POINTS
 #include &lt;trace/mytrace.h&gt;

This will cause the trace/mytrace.h file to also produce the C code
necessary to implement the trace point.

Note, if more than one trace/&lt;type&gt;.h is used to create the C code
it is best to list them all together.

 #define CREATE_TRACE_POINTS
 #include &lt;trace/foo.h&gt;
 #include &lt;trace/bar.h&gt;
 #include &lt;trace/fido.h&gt;

Thanks to Mathieu Desnoyers and Christoph Hellwig for coming up with
the cleaner solution of the define above the includes over my first
design to have the C code include a "special" header.

This patch converts sched, irq and lockdep and skb to use this new
method.

Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: Zhao Lei &lt;zhaolei@cn.fujitsu.com&gt;
Cc: Eduard - Gabriel Munteanu &lt;eduard.munteanu@linux360.ro&gt;
Cc: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch lowers the number of places a developer must modify to add
new tracepoints. The current method to add a new tracepoint
into an existing system is to write the trace point macro in the
trace header with one of the macros TRACE_EVENT, TRACE_FORMAT or
DECLARE_TRACE, then they must add the same named item into the C file
with the macro DEFINE_TRACE(name) and then add the trace point.

This change cuts out the needing to add the DEFINE_TRACE(name).
Every file that uses the tracepoint must still include the trace/&lt;type&gt;.h
file, but the one C file must also add a define before the including
of that file.

 #define CREATE_TRACE_POINTS
 #include &lt;trace/mytrace.h&gt;

This will cause the trace/mytrace.h file to also produce the C code
necessary to implement the trace point.

Note, if more than one trace/&lt;type&gt;.h is used to create the C code
it is best to list them all together.

 #define CREATE_TRACE_POINTS
 #include &lt;trace/foo.h&gt;
 #include &lt;trace/bar.h&gt;
 #include &lt;trace/fido.h&gt;

Thanks to Mathieu Desnoyers and Christoph Hellwig for coming up with
the cleaner solution of the define above the includes over my first
design to have the C code include a "special" header.

This patch converts sched, irq and lockdep and skb to use this new
method.

Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: Zhao Lei &lt;zhaolei@cn.fujitsu.com&gt;
Cc: Eduard - Gabriel Munteanu &lt;eduard.munteanu@linux360.ro&gt;
Cc: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tracing/lockdep: report the time waited for a lock</title>
<updated>2009-04-10T10:50:56+00:00</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2009-04-05T23:49:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2062501ae6505dbc5bff3a792246c2661d114050'/>
<id>2062501ae6505dbc5bff3a792246c2661d114050</id>
<content type='text'>
While trying to optimize the new lock on reiserfs to replace
the bkl, I find the lock tracing very useful though it lacks
something important for performance (and latency) instrumentation:
the time a task waits for a lock.

That's what this patch implements:

  bash-4816  [000]   202.652815: lock_contended: lock_contended: &amp;sb-&gt;s_type-&gt;i_mutex_key
  bash-4816  [000]   202.652819: lock_acquired: &amp;rq-&gt;lock (0.000 us)
 &lt;...&gt;-4787  [000]   202.652825: lock_acquired: &amp;rq-&gt;lock (0.000 us)
 &lt;...&gt;-4787  [000]   202.652829: lock_acquired: &amp;rq-&gt;lock (0.000 us)
  bash-4816  [000]   202.652833: lock_acquired: &amp;sb-&gt;s_type-&gt;i_mutex_key (16.005 us)

As shown above, the "lock acquired" field is followed by the time
it has been waiting for the lock. Usually, a lock contended entry
is followed by a near lock_acquired entry with a non-zero time waited.

Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;1238975373-15739-1-git-send-email-fweisbec@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While trying to optimize the new lock on reiserfs to replace
the bkl, I find the lock tracing very useful though it lacks
something important for performance (and latency) instrumentation:
the time a task waits for a lock.

That's what this patch implements:

  bash-4816  [000]   202.652815: lock_contended: lock_contended: &amp;sb-&gt;s_type-&gt;i_mutex_key
  bash-4816  [000]   202.652819: lock_acquired: &amp;rq-&gt;lock (0.000 us)
 &lt;...&gt;-4787  [000]   202.652825: lock_acquired: &amp;rq-&gt;lock (0.000 us)
 &lt;...&gt;-4787  [000]   202.652829: lock_acquired: &amp;rq-&gt;lock (0.000 us)
  bash-4816  [000]   202.652833: lock_acquired: &amp;sb-&gt;s_type-&gt;i_mutex_key (16.005 us)

As shown above, the "lock acquired" field is followed by the time
it has been waiting for the lock. Usually, a lock contended entry
is followed by a near lock_acquired entry with a non-zero time waited.

Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;1238975373-15739-1-git-send-email-fweisbec@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2009-04-06T20:37:30+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-04-06T20:37:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=609862be074cc20e007c640fd936ffe798b41abc'/>
<id>609862be074cc20e007c640fd936ffe798b41abc</id>
<content type='text'>
* 'locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  lockdep: add stack dumps to asserts
  hrtimer: fix rq-&gt;lock inversion (again)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  lockdep: add stack dumps to asserts
  hrtimer: fix rq-&gt;lock inversion (again)
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'tracing/core-v2' into tracing-for-linus</title>
<updated>2009-04-01T22:49:02+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2009-04-01T19:54:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8302294f43250dc337108c51882a6007f2b1e2e0'/>
<id>8302294f43250dc337108c51882a6007f2b1e2e0</id>
<content type='text'>
Conflicts:
	include/linux/slub_def.h
	lib/Kconfig.debug
	mm/slob.c
	mm/slub.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	include/linux/slub_def.h
	lib/Kconfig.debug
	mm/slob.c
	mm/slub.c
</pre>
</div>
</content>
</entry>
<entry>
<title>lockdep: add stack dumps to asserts</title>
<updated>2009-03-31T12:53:01+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2009-03-18T11:38:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=eedeeabdeeadb016b8c783e3620d06b98d0cb4e1'/>
<id>eedeeabdeeadb016b8c783e3620d06b98d0cb4e1</id>
<content type='text'>
Have a better idea about exactly which loc causes a lockdep
limit overflow. Often it's a bug or inefficiency in that
subsystem.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;1237376327.5069.253.camel@laptop&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Have a better idea about exactly which loc causes a lockdep
limit overflow. Often it's a bug or inefficiency in that
subsystem.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;1237376327.5069.253.camel@laptop&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'linus' into locking-for-linus</title>
<updated>2009-03-31T11:53:43+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2009-03-31T11:53:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7bee946358c3cb957d4aa648fc5ab3cad0b232d0'/>
<id>7bee946358c3cb957d4aa648fc5ab3cad0b232d0</id>
<content type='text'>
Conflicts:
	lib/Kconfig.debug
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	lib/Kconfig.debug
</pre>
</div>
</content>
</entry>
<entry>
<title>lockdep: fix deadlock in lockdep_trace_alloc</title>
<updated>2009-03-30T21:19:24+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2009-03-20T10:13:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2f8501815256af8498904e68bd0984b1afffd6f8'/>
<id>2f8501815256af8498904e68bd0984b1afffd6f8</id>
<content type='text'>
Heiko reported that we grab the graph lock with irqs enabled.

Fix this by providng the same wrapper as all other lockdep entry
functions have.

Reported-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Nick Piggin &lt;npiggin@suse.de&gt;
LKML-Reference: &lt;1237544000.24626.52.camel@twins&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Heiko reported that we grab the graph lock with irqs enabled.

Fix this by providng the same wrapper as all other lockdep entry
functions have.

Reported-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Nick Piggin &lt;npiggin@suse.de&gt;
LKML-Reference: &lt;1237544000.24626.52.camel@twins&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
</feed>
