Re: [patch] add /proc/pid/stack to dump task's stack trace

From: Ingo Molnar
Date: Fri Nov 07 2008 - 02:59:46 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> > > + * buffer size used for proc read. See proc_info_read().
> > > + * 4K page size but our output routines use some slack for overruns
> > > + */
> > > +#define PROC_BLOCK_SIZE (3*1024)
>
> That sounds like a proper limit - the hard limit for this particular
> printout function is 4096-170, so we are well within the
> PROC_BLOCK_SIZE range.

ok, i've added Ken's patch to tip/core/stacktrace and started testing
it.

Alexey, i've added your Acked-by because you appeared to like the
patch - let me know if i should remove it.

i've done a few finishing touches to the patch as well - see the end
result below.

Andrew, i remember that you found some sort of problem (crashes?) with
stack-dumping tasks that are running on another CPU (or something like
that) - do you remember the specifics? Could we run into any of those
problems with the patch below, on some rare architecture?

Ingo

------------------->