Re: [PATCH RFC 00/11] lock monitor: Separate features related tolock

From: Peter Zijlstra
Date: Tue Mar 23 2010 - 11:45:46 EST


On Wed, 2010-03-17 at 16:39 +0100, Frederic Weisbecker wrote:
>
> might_lock_read() uses might_fault(), rcu, workqueues and probably
> yet some others use sequences of lock_acquire/lock_release to prove
> locking while there is actually no real lock operation involved, but
> this is to detect dependency/balance mistakes.

might_fault() simply always takes the mmap_sem because actually hitting
the fault path (which otherwise would establish that relation) is very
rare for some cases, so by forcing that dependency we get better
coverage.

rcu_read_lock() is an actual lock :-)

workqueues use 'fake' locks to connect lock chains to flush, so that we
can detect things like trying to flush a workqueue while holding a lock
that is required to complete the work.


--
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/