<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/kernel/lockdep.c, branch v2.6.30-rc5</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>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>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>
<entry>
<title>Merge branch 'core/locking' into tracing/ftrace</title>
<updated>2009-03-13T00:33:21+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2009-03-13T00:33:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=480c93df5b99699390f93a7024c9f60d09da0e96'/>
<id>480c93df5b99699390f93a7024c9f60d09da0e96</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>lockdep: remove duplicate CONFIG_DEBUG_LOCKDEP definitions</title>
<updated>2009-03-05T10:46:00+00:00</updated>
<author>
<name>David Rientjes</name>
<email>rientjes@google.com</email>
</author>
<published>2009-03-05T10:29:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=03d78913f01e8f6599823f00357ed17b32747d3d'/>
<id>03d78913f01e8f6599823f00357ed17b32747d3d</id>
<content type='text'>
Impact: cleanup

The atomic debug modifiers are already defined in
kernel/lockdep_internals.h.

Signed-off-by: David Rientjes &lt;rientjes@google.com&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
LKML-Reference: &lt;alpine.DEB.2.00.0903050222160.30401@chino.kir.corp.google.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>
Impact: cleanup

The atomic debug modifiers are already defined in
kernel/lockdep_internals.h.

Signed-off-by: David Rientjes &lt;rientjes@google.com&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
LKML-Reference: &lt;alpine.DEB.2.00.0903050222160.30401@chino.kir.corp.google.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tracing: add lockdep tracepoints for lock acquire/release</title>
<updated>2009-03-04T17:49:58+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2009-03-04T11:32:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=efed792d6738964f399a508ef9e831cd60fa4657'/>
<id>efed792d6738964f399a508ef9e831cd60fa4657</id>
<content type='text'>
Augment the traces with lock names when lockdep is available:

 1)               |  down_read_trylock() {
 1)               |    _spin_lock_irqsave() {
 1)               |      /* lock_acquire: &amp;sem-&gt;wait_lock */
 1)   4.201 us    |    }
 1)               |    _spin_unlock_irqrestore() {
 1)               |      /* lock_release: &amp;sem-&gt;wait_lock */
 1)   3.523 us    |    }
 1)               |  /* lock_acquire: try read &amp;mm-&gt;mmap_sem */
 1) + 13.386 us   |  }
 1)   1.635 us    |  find_vma();
 1)               |  handle_mm_fault() {
 1)               |    __do_fault() {
 1)               |      filemap_fault() {
 1)               |        find_lock_page() {
 1)               |          find_get_page() {
 1)               |            /* lock_acquire: read rcu_read_lock */
 1)               |            /* lock_release: rcu_read_lock */
 1)   5.697 us    |          }
 1)   8.158 us    |        }
 1) + 11.079 us   |      }
 1)               |      _spin_lock() {
 1)               |        /* lock_acquire: __pte_lockptr(page) */
 1)   3.949 us    |      }
 1)   1.460 us    |      page_add_file_rmap();
 1)               |      _spin_unlock() {
 1)               |        /* lock_release: __pte_lockptr(page) */
 1)   3.115 us    |      }
 1)               |      unlock_page() {
 1)   1.421 us    |        page_waitqueue();
 1)   1.220 us    |        __wake_up_bit();
 1)   6.519 us    |      }
 1) + 34.328 us   |    }
 1) + 37.452 us   |  }
 1)               |  up_read() {
 1)               |  /* lock_release: &amp;mm-&gt;mmap_sem */
 1)               |    _spin_lock_irqsave() {
 1)               |      /* lock_acquire: &amp;sem-&gt;wait_lock */
 1)   3.865 us    |    }
 1)               |    _spin_unlock_irqrestore() {
 1)               |      /* lock_release: &amp;sem-&gt;wait_lock */
 1)   8.562 us    |    }
 1) + 17.370 us   |  }

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: =?ISO-8859-1?Q?T=F6r=F6k?= Edwin &lt;edwintorok@gmail.com&gt;
Cc: Jason Baron &lt;jbaron@redhat.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
LKML-Reference: &lt;1236166375.5330.7209.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>
Augment the traces with lock names when lockdep is available:

 1)               |  down_read_trylock() {
 1)               |    _spin_lock_irqsave() {
 1)               |      /* lock_acquire: &amp;sem-&gt;wait_lock */
 1)   4.201 us    |    }
 1)               |    _spin_unlock_irqrestore() {
 1)               |      /* lock_release: &amp;sem-&gt;wait_lock */
 1)   3.523 us    |    }
 1)               |  /* lock_acquire: try read &amp;mm-&gt;mmap_sem */
 1) + 13.386 us   |  }
 1)   1.635 us    |  find_vma();
 1)               |  handle_mm_fault() {
 1)               |    __do_fault() {
 1)               |      filemap_fault() {
 1)               |        find_lock_page() {
 1)               |          find_get_page() {
 1)               |            /* lock_acquire: read rcu_read_lock */
 1)               |            /* lock_release: rcu_read_lock */
 1)   5.697 us    |          }
 1)   8.158 us    |        }
 1) + 11.079 us   |      }
 1)               |      _spin_lock() {
 1)               |        /* lock_acquire: __pte_lockptr(page) */
 1)   3.949 us    |      }
 1)   1.460 us    |      page_add_file_rmap();
 1)               |      _spin_unlock() {
 1)               |        /* lock_release: __pte_lockptr(page) */
 1)   3.115 us    |      }
 1)               |      unlock_page() {
 1)   1.421 us    |        page_waitqueue();
 1)   1.220 us    |        __wake_up_bit();
 1)   6.519 us    |      }
 1) + 34.328 us   |    }
 1) + 37.452 us   |  }
 1)               |  up_read() {
 1)               |  /* lock_release: &amp;mm-&gt;mmap_sem */
 1)               |    _spin_lock_irqsave() {
 1)               |      /* lock_acquire: &amp;sem-&gt;wait_lock */
 1)   3.865 us    |    }
 1)               |    _spin_unlock_irqrestore() {
 1)               |      /* lock_release: &amp;sem-&gt;wait_lock */
 1)   8.562 us    |    }
 1) + 17.370 us   |  }

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: =?ISO-8859-1?Q?T=F6r=F6k?= Edwin &lt;edwintorok@gmail.com&gt;
Cc: Jason Baron &lt;jbaron@redhat.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
LKML-Reference: &lt;1236166375.5330.7209.camel@laptop&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lockdep: remove extra "irq" string</title>
<updated>2009-03-04T17:38:34+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2009-03-04T13:53:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=26575e28df5eb2050c02369843faba38cecb4d8c'/>
<id>26575e28df5eb2050c02369843faba38cecb4d8c</id>
<content type='text'>
Impact: clarify lockdep printk text

print_irq_inversion_bug() gets handed state strings of the form

  "HARDIRQ", "SOFTIRQ", "RECLAIM_FS"

and appends "-irq-{un,}safe" to them, which is either redudant for *IRQ or
confusing in the RECLAIM_FS case.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;1236175192.5330.7585.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>
Impact: clarify lockdep printk text

print_irq_inversion_bug() gets handed state strings of the form

  "HARDIRQ", "SOFTIRQ", "RECLAIM_FS"

and appends "-irq-{un,}safe" to them, which is either redudant for *IRQ or
confusing in the RECLAIM_FS case.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;1236175192.5330.7585.camel@laptop&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
</feed>
