lkml.org 
[lkml]   [2013]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: scheduling while atomic & hang.

* Frederic Weisbecker <fweisbec@gmail.com> wrote:

> On Fri, Jul 05, 2013 at 12:27:51PM -0700, Linus Torvalds wrote:
> > On Thu, Jul 4, 2013 at 11:51 PM, Ingo Molnar <mingo@kernel.org> wrote:
> > >
> > > It would be nice to have a full-kernel-stack backtrace printout as an
> > > option, which prints entries 'above' the current RSP.
> >
> > One problem with that is that it is likely to be mostly overwritten by
> > the debug code that is about to print this all out - and any non-debug
> > code may well be really old, just with a sufficiently deep stack trace
> > to show up. Not to mention missing any irq-stack changes etc anyway.
> >
> > So it can easily be *very* misleading - I'm not sure how useful it
> > would be as an idea.
> >
> > Linus
>
> So if the unwider doesn't run with the same stak than the target, it
> migh work. This can work with BUG for example But I believe that WARN
> doesn't do a trap in x86.

Instead of switching stacks it might be better to create an early snapshot
of the stack into a temporary area before calling anything, and to print
that. This is debug code, so overhead is not a big issue.

But yeah, Linus is right, it gets hairy, can be misleading and has limited
utility :-/

Thanks,

Ingo


\
 
 \ /
  Last update: 2013-07-06 11:01    [W:0.046 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site