lkml.org 
[lkml]   [2010]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC patch 2/3] tree/tiny rcu: Add debug RCU head objects (v3)
On Fri, Mar 19, 2010 at 04:47:41PM -0400, Mathieu Desnoyers wrote:
> Helps finding racy users of call_rcu(), which results in hangs because list
> entries are overwritten and/or skipped.
>
> This new patch version is based on the debugobjects with the newly introduced
> "active state" tracker.
>
> Non-initialized entries are all considered as "statically initialized". An
> activation fixup (triggered by call_rcu()) takes care of performing the debug
> object initialization without issuing any warning. Since we cannot increase the
> size of struct rcu_head, I don't see much room to put an identifier for
> statically initialized rcu_head structures. So for now, we have to live without
> "activation without explicit init" detection. But the main purpose of this debug
> option is to detect double-activations (double call_rcu() use of a rcu_head
> before the callback is executed), which is correctly addressed here.
>
> This also detects potential internal RCU callback corruption, which would cause
> the callbacks to be executed twice.

Is this useful?

Basic usage is so there no double call_rcu():

if (atomic_dec_and_test())
call_rcu()

\
 
 \ /
  Last update: 2010-03-19 23:13    [from the cache]
©2003-2011 Jasper Spaans