lkml.org 
[lkml]   [2013]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: tty^Wrcu/perf lockdep trace.
On Thu, Oct 03, 2013 at 12:58:32PM -0700, Paul E. McKenney wrote:
> On Thu, Oct 03, 2013 at 09:42:26PM +0200, Peter Zijlstra wrote:
> >
> > That's not tty; that's RCU..
> >
> > On Thu, Oct 03, 2013 at 03:08:30PM -0400, Dave Jones wrote:
> > > ======================================================
> > > [ INFO: possible circular locking dependency detected ]
> > > 3.12.0-rc3+ #92 Not tainted
> > > -------------------------------------------------------
> > > trinity-child2/15191 is trying to acquire lock:
> > > (&rdp->nocb_wq){......}, at: [<ffffffff8108ff43>] __wake_up+0x23/0x50
> > >
> > > but task is already holding lock:
> > > (&ctx->lock){-.-...}, at: [<ffffffff81154c19>] perf_event_exit_task+0x109/0x230
> > >
> > > which lock already depends on the new lock.
> > >
> > >
> > > the existing dependency chain (in reverse order) is:
> > >
> > > -> #3 (&ctx->lock){-.-...}:
> > >
> > > -> #2 (&rq->lock){-.-.-.}:
> > >
> > > -> #1 (&p->pi_lock){-.-.-.}:
> > >
> > > -> #0 (&rdp->nocb_wq){......}:
>
> I suppose I could defer the ->nocb_wq wakeup until the next context switch
> or transition to idle/userspace, but it might be simpler for put_ctx()
> to maintain a per-CPU chain of callbacks which are kfree_rcu()ed when
> ctx->lock is dropped. Also easier on the kernel/user and kernel/idle
> transition overhead/latency...
>
> Other thoughts?

What's caused this? We've had that kfree_rcu() in there for ages. I need
to audit all the get/put_ctx calls anyway for an unrelated issue but I
fear its going to be messy to defer that kfree_rcu() call, but I can
try.




\
 
 \ /
  Last update: 2013-10-04 09:01    [W:0.841 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site