[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110513132916.GB1840@nowhere>
Date: Fri, 13 May 2011 15:29:19 +0200
From: Frederic Weisbecker <fweisbec@...il.com>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Steven Rostedt <rostedt@...dmis.org>, Ingo Molnar <mingo@...e.hu>,
LKML <linux-kernel@...r.kernel.org>,
"H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 2/2] x86: Make the x86-64 stacktrace code safely
callable from scheduler
On Fri, May 13, 2011 at 03:19:58PM +0200, Peter Zijlstra wrote:
> On Fri, 2011-05-13 at 14:48 +0200, Frederic Weisbecker wrote:
> > I haven't observed any deadlock. trace events disable preemption and
> > other tracers do too (my changelog was buggy).
> >
> > I just worried about potential other users, like a WARN_ON in the
> > scheduler or so.
> >
> > My worry is the following scenario:
> >
> > schedule() {
> > acquire(rq)
> > set_tsk_need_resched
> > WARN_ON() {
> > stack_trace() {
> > preempt_enable() {
> > preempt_schedule() {
>
> Would never happen, because rq->lock is a spinlock which holds another
> preempt count so preempt_enable() would never schedule.
Oh right.
>
> > acquire(rq)
> > }
> > }
> > }
> > }
> > }
>
>
>
> > I don't know if it happens that one set TIF_NEED_RESCHED remotely,
>
> Yes
>
> > or if TIF_NEED_RESCHED can be set when we hold the rq,
>
> Yes
>
> > and then we
> > can be followed by a WARN_ON, ...
>
> Not quite sure, but possible.
>
> > So I preferred to be careful.
>
> Still not quite seeing how all things could go bang.
Nah, forget about that, I was just confused ;)
--
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