[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20071001062819.GA2914@elte.hu>
Date: Mon, 1 Oct 2007 08:28:19 +0200
From: Ingo Molnar <mingo@...e.hu>
To: akpm@...ux-foundation.org
Cc: mm-commits@...r.kernel.org, satyam@...radead.org,
linux-kernel@...r.kernel.org
Subject: Re: + sched-use-show_regs-to-improve-__schedule_bug-output.patch
added to -mm tree
* akpm@...ux-foundation.org <akpm@...ux-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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists