LWN.net Logo

using lockdep to validate rcu usage

From:  Peter Zijlstra <a.p.zijlstra@chello.nl>
To:  linux-kernel@vger.kernel.org
Subject:  [RFC][PATCH 0/6] using lockdep to validate rcu usage
Date:  Wed, 19 Sep 2007 12:41:25 +0200
Message-ID:  <20070919104125.286538000@chello.nl>
Cc:  "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>, Ingo Molnar <mingo@elte.hu>, Andrew Morton <akpm@linux-foundation.org>, Peter Zijlstra <a.p.zijlstra@chello.nl>, Nick Piggin <nickpiggin@yahoo.com.au>
Archive-link:  Article, Thread

This patch set uses lockdep to validate rcu usage.

It annotates rcu_read_{,un}lock{,_bh}() to catch imbalances. And further uses
that information to establish a proper context for rcu_dereference().

It also separates implicit from explicit preempt_disable() usage, in order to
separate rcu_dereference() from the locking model.

A kernel (2.6.23-rc4-mm1) with these patches boots but does have some funnies -
I suspect it calls printf from places it doesn't like.

The first patch should be safe to apply, the rest is RFC.

If people want to see the very noisy bootlog this generates:
  http://programming.kicks-ass.net/kernel-patches/lockdep_r...



Copyright © 2007, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds