From: Ingo Molnar <mingo@elte.hu>
To: akpm@linux-foundation.org
Cc: mm-commits@vger.kernel.org, satyam@infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: + sched-use-show_regs-to-improve-__schedule_bug-output.patch added to -mm tree
Date: Mon, 1 Oct 2007 08:28:19 +0200 [thread overview]
Message-ID: <20071001062819.GA2914@elte.hu> (raw)
In-Reply-To: <200709130749.l8D7nJYX008415@imap1.linux-foundation.org>
* 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
prev parent reply other threads:[~2007-10-01 6:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-13 7:49 + sched-use-show_regs-to-improve-__schedule_bug-output.patch added to -mm tree akpm
2007-10-01 6:28 ` Ingo Molnar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071001062819.GA2914@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=satyam@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.