lkml.org 
[lkml]   [2010]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annotations
On Thu, May 13, 2010 at 08:23:40AM -0700, Paul E. McKenney wrote:
> On Thu, May 13, 2010 at 03:07:23PM +0200, Peter Zijlstra wrote:
> > On Wed, 2010-05-12 at 16:00 -0700, Paul E. McKenney wrote:
> > > Any thoughts? One approach would be to create a separate lockdep class
> > > for vhost workqueue state, similar to the approach used in instrument
> > > rcu_read_lock() and friends.
> >
> > workqueue_struct::lockdep_map, its held while executing worklets.
> >
> > lock_is_held(&vhost_workqueue->lockdep_map), should do as you want.
>
> Thank you, Peter!!!
>
> Thanx, Paul

vhost in fact does flush_work rather than
flush_workqueue, so while for now everything runs
from vhost_workqueue in theory nothing would break
if we use some other workqueue or even a combination
thereof.

I guess when/if this happens, we could start by converting
to _raw and then devise a solution.

By the way what would be really nice is if we had a way
to trap when rcu protected pointer is freed without a flush
while some reader is running. Current annotation does not
allow this, does it?

--
MST


\
 
 \ /
  Last update: 2010-05-17 22:41    [from the cache]
©2003-2011 Jasper Spaans