<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/lockdep_proc.c, branch v2.6.30</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.30</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.30'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2009-02-14T22:28:28Z</updated>
<entry>
<title>lockstat: warn about disabled lock debugging</title>
<updated>2009-02-14T22:28:28Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2009-02-14T15:59:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9833f8cb952b9aa3f98a71e7bef8820cee3261a0'/>
<id>urn:sha1:9833f8cb952b9aa3f98a71e7bef8820cee3261a0</id>
<content type='text'>
Avoid confusion and clearly state lock debugging got disabled.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>lockdep: get_user_chars() redo</title>
<updated>2009-02-14T22:28:22Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2009-01-22T16:53:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f510b233cfc7bfd57b6007071c52aa42e3d16b06'/>
<id>urn:sha1:f510b233cfc7bfd57b6007071c52aa42e3d16b06</id>
<content type='text'>
Generic, states independent, get_user_chars().

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>lockdep: sanitize bit names</title>
<updated>2009-02-14T22:27:51Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2009-01-22T12:10:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4fc95e867f1e75351b89db3c68212dfcce7ea563'/>
<id>urn:sha1:4fc95e867f1e75351b89db3c68212dfcce7ea563</id>
<content type='text'>
s/\(LOCKF\?_ENABLED_[^ ]*\)S\(_READ\)\?\&gt;/\1\2/g

So that the USED_IN and ENABLED have the same names.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>lockdep: annotate reclaim context (__GFP_NOFS)</title>
<updated>2009-02-14T22:27:49Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2009-01-21T07:12:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cf40bd16fdad42c053040bcd3988f5fdedbb6c57'/>
<id>urn:sha1:cf40bd16fdad42c053040bcd3988f5fdedbb6c57</id>
<content type='text'>
Here is another version, with the incremental patch rolled up, and
added reclaim context annotation to kswapd, and allocation tracing
to slab allocators (which may only ever reach the page allocator
in rare cases, so it is good to put annotations here too).

Haven't tested this version as such, but it should be getting closer
to merge worthy ;)

--
After noticing some code in mm/filemap.c accidentally perform a __GFP_FS
allocation when it should not have been, I thought it might be a good idea to
try to catch this kind of thing with lockdep.

I coded up a little idea that seems to work. Unfortunately the system has to
actually be in __GFP_FS page reclaim, then take the lock, before it will mark
it. But at least that might still be some orders of magnitude more common
(and more debuggable) than an actual deadlock condition, so we have some
improvement I hope (the concept is no less complete than discovery of a lock's
interrupt contexts).

I guess we could even do the same thing with __GFP_IO (normal reclaim), and
even GFP_NOIO locks too... but filesystems will have the most locks and fiddly
code paths, so let's start there and see how it goes.

It *seems* to work. I did a quick test.

=================================
[ INFO: inconsistent lock state ]
2.6.28-rc6-00007-ged31348-dirty #26
---------------------------------
inconsistent {in-reclaim-W} -&gt; {ov-reclaim-W} usage.
modprobe/8526 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (testlock){--..}, at: [&lt;ffffffffa0020055&gt;] brd_init+0x55/0x216 [brd]
{in-reclaim-W} state was registered at:
  [&lt;ffffffff80267bdb&gt;] __lock_acquire+0x75b/0x1a60
  [&lt;ffffffff80268f71&gt;] lock_acquire+0x91/0xc0
  [&lt;ffffffff8070f0e1&gt;] mutex_lock_nested+0xb1/0x310
  [&lt;ffffffffa002002b&gt;] brd_init+0x2b/0x216 [brd]
  [&lt;ffffffff8020903b&gt;] _stext+0x3b/0x170
  [&lt;ffffffff80272ebf&gt;] sys_init_module+0xaf/0x1e0
  [&lt;ffffffff8020c3fb&gt;] system_call_fastpath+0x16/0x1b
  [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff
irq event stamp: 3929
hardirqs last  enabled at (3929): [&lt;ffffffff8070f2b5&gt;] mutex_lock_nested+0x285/0x310
hardirqs last disabled at (3928): [&lt;ffffffff8070f089&gt;] mutex_lock_nested+0x59/0x310
softirqs last  enabled at (3732): [&lt;ffffffff8061f623&gt;] sk_filter+0x83/0xe0
softirqs last disabled at (3730): [&lt;ffffffff8061f5b6&gt;] sk_filter+0x16/0xe0

other info that might help us debug this:
1 lock held by modprobe/8526:
 #0:  (testlock){--..}, at: [&lt;ffffffffa0020055&gt;] brd_init+0x55/0x216 [brd]

stack backtrace:
Pid: 8526, comm: modprobe Not tainted 2.6.28-rc6-00007-ged31348-dirty #26
Call Trace:
 [&lt;ffffffff80265483&gt;] print_usage_bug+0x193/0x1d0
 [&lt;ffffffff80266530&gt;] mark_lock+0xaf0/0xca0
 [&lt;ffffffff80266735&gt;] mark_held_locks+0x55/0xc0
 [&lt;ffffffffa0020000&gt;] ? brd_init+0x0/0x216 [brd]
 [&lt;ffffffff802667ca&gt;] trace_reclaim_fs+0x2a/0x60
 [&lt;ffffffff80285005&gt;] __alloc_pages_internal+0x475/0x580
 [&lt;ffffffff8070f29e&gt;] ? mutex_lock_nested+0x26e/0x310
 [&lt;ffffffffa0020000&gt;] ? brd_init+0x0/0x216 [brd]
 [&lt;ffffffffa002006a&gt;] brd_init+0x6a/0x216 [brd]
 [&lt;ffffffffa0020000&gt;] ? brd_init+0x0/0x216 [brd]
 [&lt;ffffffff8020903b&gt;] _stext+0x3b/0x170
 [&lt;ffffffff8070f8b9&gt;] ? mutex_unlock+0x9/0x10
 [&lt;ffffffff8070f83d&gt;] ? __mutex_unlock_slowpath+0x10d/0x180
 [&lt;ffffffff802669ec&gt;] ? trace_hardirqs_on_caller+0x12c/0x190
 [&lt;ffffffff80272ebf&gt;] sys_init_module+0xaf/0x1e0
 [&lt;ffffffff8020c3fb&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>lockstat: contend with points</title>
<updated>2008-10-20T13:43:10Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2008-10-16T21:17:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c7e78cff6b7518212247fb20b1dc6411540dc9af'/>
<id>urn:sha1:c7e78cff6b7518212247fb20b1dc6411540dc9af</id>
<content type='text'>
We currently only provide points that have to wait on contention, also
lists the points we have to wait for.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>lockstat: fixup signed division</title>
<updated>2008-09-23T14:19:37Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2008-09-23T13:33:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6918bc5c830e890681eabb3c6cb6b8d117a52d14'/>
<id>urn:sha1:6918bc5c830e890681eabb3c6cb6b8d117a52d14</id>
<content type='text'>
Some recent modification to this code made me notice the little todo mark.
Now that we have more elaborate 64-bit division functions this isn't hard.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>lockstat: fix numerical output rounding error</title>
<updated>2008-08-26T08:37:46Z</updated>
<author>
<name>Joe Korty</name>
<email>joe.korty@ccur.com</email>
</author>
<published>2008-08-25T21:15:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2189459d25a47401c69a17794c9d390c890351f9'/>
<id>urn:sha1:2189459d25a47401c69a17794c9d390c890351f9</id>
<content type='text'>
Fix rounding error in /proc/lock_stat numerical output.

On occasion the two digit fractional part contains the three
digit value '100'.  This is due to a bug in the rounding algorithm
which pushes values in the range '95..99' to '100' rather than
to '00' + an increment to the integer part.  For example,

	- 123456.100      old display
	+ 123457.00	  new display

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>lockdep: fix build if CONFIG_PROVE_LOCKING not defined</title>
<updated>2008-08-15T17:22:04Z</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2008-08-15T16:33:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=df60a8441866153d691ae69b77934904c2de5e0d'/>
<id>urn:sha1:df60a8441866153d691ae69b77934904c2de5e0d</id>
<content type='text'>
If CONFIG_PROVE_LOCKING not defined, then no dependency information
is available.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>lockdep: handle chains involving classes defined in modules</title>
<updated>2008-08-11T07:30:26Z</updated>
<author>
<name>Rabin Vincent</name>
<email>rabin@rab.in</email>
</author>
<published>2008-08-11T07:30:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8bfe0298f7a04952d19f4a2cf510d7a6311eeed0'/>
<id>urn:sha1:8bfe0298f7a04952d19f4a2cf510d7a6311eeed0</id>
<content type='text'>
Solve this by marking the classes as unused and not printing information
about the unused classes.

Reported-by: Eric Sesterhenn &lt;snakebyte@gmx.de&gt;
Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
Acked-by: Huang Ying &lt;ying.huang@intel.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>lockdep: fix combinatorial explosion in lock subgraph traversal</title>
<updated>2008-07-31T16:38:28Z</updated>
<author>
<name>David Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2008-07-30T04:45:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=419ca3f13532793b81aff09f80c60af3eacbb43d'/>
<id>urn:sha1:419ca3f13532793b81aff09f80c60af3eacbb43d</id>
<content type='text'>
When we traverse the graph, either forwards or backwards, we
are interested in whether a certain property exists somewhere
in a node reachable in the graph.

Therefore it is never necessary to traverse through a node more
than once to get a correct answer to the given query.

Take advantage of this property using a global ID counter so that we
need not clear all the markers in all the lock_class entries before
doing a traversal.  A new ID is choosen when we start to traverse, and
we continue through a lock_class only if it's ID hasn't been marked
with the new value yet.

This short-circuiting is essential especially for high CPU count
systems.  The scheduler has a runqueue per cpu, and needs to take
two runqueue locks at a time, which leads to long chains of
backwards and forwards subgraphs from these runqueue lock nodes.
Without the short-circuit implemented here, a graph traversal on
a runqueue lock can take up to (1 &lt;&lt; (N - 1)) checks on a system
with N cpus.

For anything more than 16 cpus or so, lockdep will eventually bring
the machine to a complete standstill.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
