[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100326192712.GA7166@nowhere>
Date: Fri, 26 Mar 2010 20:27:16 +0100
From: Frederic Weisbecker <fweisbec@...il.com>
To: Mike Galbraith <efault@....de>
Cc: Li Zefan <lizf@...fujitsu.com>,
LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <peterz@...radead.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Paul Mackerras <paulus@...ba.org>
Subject: Re: [BUG] perf: hard lockup when using perf-sched
On Fri, Mar 26, 2010 at 08:10:40PM +0100, Mike Galbraith wrote:
> On Fri, 2010-03-26 at 18:23 +0100, Frederic Weisbecker wrote:
> > On Fri, Mar 26, 2010 at 11:11:33AM +0100, Mike Galbraith wrote:
>
> > > perf: fix perf sched record forkbomb deadlock
> > >
> > > perf sched record can deadlock a box should the holder of handle->data->lock
> > > take an interrupt, and then attempt to acquire an rq lock held by a CPU trying
> > > to acquire the same lock. Disable interrupts.
> >
> >
> >
> > Aah.
> >
> > So the scenario is the following inversion?
> >
> > CPU0 CPU1
> > sched event with rq->lock held
> > grab handle->data->lock
> > spin on handle->data->lock
> > interrupt
> > try to grab rq->lock
>
> Yeah, handle->data->lock holder dare not try to grab any rq lock because
> of sched event with rq->lock held.
>
But if that happens with perf sched, there is something weird.
perf sched only use sched events, which have interrupt disabled
from the trace event handler, so this is not supposed to happen.
But if there is another kind of event involved, something that has
interrupts enabled, may be some software events, then it may
happen indeed.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists