Re: [PATCH] tracing: use raw spinlocks instead of spinlocks

From: Frédéric Weisbecker
Date: Mon Nov 03 2008 - 08:24:39 EST


2008/11/3 Ingo Molnar <mingo@xxxxxxx>:
> i'm wondering, does the changing to raw-spinlocks fix the deadlock?

Yes. The real problem was that insertion hold a spinlock, and then the spinlock
was traced, and then it could hold anymore the spinlock in insertion
....deadlock.
It fixed the problem with this solution.

> It's generally just the lack of recursion checking that is causing
> lockdep troubles - and recursion checking we want for all the more
> intrusive ftrace plugins anyway.

This problem wasn't lockdep relative. _But_ I had to deactivate lockdep for my
plugin to work. It seems there are some deadlock encountered with lockdep
enabled but I'm not sure why...
But of course it's just to make easy its implementation, I will adapt
it to rely on lockdep
in the end.

> Frederic, do you have trouble finding the source of the deadlock? In
> theory the NMI watchdog should be able to punch through it. (if not
> then we need to improve things so that it can)

I haven't any deadlock more (I hope) since I implemented the solution
of Steven (
and deactivated lockdep). But I discovered other problems that seem to
rely on page
faults (or it causes them). But I'm not sure yet, it was late at
night. I went to bed after some awful Oops.

The good news is that I now have backtraces to debug it :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/