public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: + sched-use-show_regs-to-improve-__schedule_bug-output.patch added to -mm tree
       [not found] <200709130749.l8D7nJYX008415@imap1.linux-foundation.org>
@ 2007-10-01  6:28 ` Ingo Molnar
  0 siblings, 0 replies; only message in thread
From: Ingo Molnar @ 2007-10-01  6:28 UTC (permalink / raw)
  To: akpm; +Cc: mm-commits, satyam, linux-kernel


* akpm@linux-foundation.org <akpm@linux-foundation.org> wrote:

> The patch titled
>      sched: Use show_regs() to improve __schedule_bug() output
> has been added to the -mm tree.  Its filename is
>      sched-use-show_regs-to-improve-__schedule_bug-output.patch
[...]
>   */
>  static noinline void __schedule_bug(struct task_struct *prev)
>  {
> -	printk(KERN_ERR "BUG: scheduling while atomic: %s/0x%08x/%d\n",
> -		prev->comm, preempt_count(), prev->pid);
> +	struct pt_regs *regs = get_irq_regs();
> +
> +	printk(KERN_ERR "BUG: scheduling while atomic: %s/%d/0x%08x\n",
> +		prev->comm, prev->pid, preempt_count());
> +
>  	debug_show_held_locks(prev);
>  	if (irqs_disabled())
>  		print_irqtrace_events(prev);
> -	dump_stack();
> +
> +	if (regs)
> +		show_regs(regs);
> +	else
> +		dump_stack();

the principle looks good to me, but please implement this a bit 
differently: make show_regs(NULL) fall back to dump_stack() (on all 
architectures) and thus reduce the size of the scheduler (and other code 
i guess).

	Ingo

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-01  6:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200709130749.l8D7nJYX008415@imap1.linux-foundation.org>
2007-10-01  6:28 ` + sched-use-show_regs-to-improve-__schedule_bug-output.patch added to -mm tree Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox