* [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to