FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 03-12-2010, 04:15 PM
Andy Whitcroft
 
Default Ubuntu: Sauce: Disable function tracing after hitting __schedule_bug

On Fri, Mar 12, 2010 at 10:23:45AM -0500, Chase Douglas wrote:

> >> + * * * tracing_off();
> >> +

How about adding a __read_mostly toggle for this set by a boot
parameter:

if (likely(sched_tracing_stop))
tracing_off();

-apw

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 03-31-2010, 10:39 AM
Andy Whitcroft
 
Default Ubuntu: Sauce: Disable function tracing after hitting __schedule_bug

On Fri, Mar 12, 2010 at 09:23:40AM -0500, Chase Douglas wrote:
> If we hit __schedule_bug, then something bad has happened, and it would
> be helpful to get an accurate function trace to see what's going wrong.
> The debugfs function tracer works great for this task, but it spits out
> a ton of information both before and after the real bug occurs. This
> change stops the tracing when we enter __schedule_bug, so the tracing
> report is smaller and leaves the developer with the needed information
> right at the end of the trace.
>
> This should not cause a regression or any negative effects unless
> someone truly wanted to trace through a __schedule_bug call. In that
> case, they can recompile their own kernel without this call. The vast
> majority of tracings that hit __schedule_bug would be enhanced by this
> change.
>
> To see how tracing with this change can be used for "scheduling while
> atomic" bugs, see http://bugs.launchpad.net/bugs/534549.
>
> Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
> ---
> kernel/sched.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/sched.c b/kernel/sched.c
> index 4d01095..0d2ba50 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -5341,6 +5341,8 @@ static noinline void __schedule_bug(struct task_struct *prev)
> {
> struct pt_regs *regs = get_irq_regs();
>
> + tracing_off();
> +
> printk(KERN_ERR "BUG: scheduling while atomic: %s/%d/0x%08x
",
> prev->comm, prev->pid, preempt_count());
>

Seems reasonable if it make debugging easier.

Acked-by: Andy Whitcroft <apw@canonical.com>

-apw

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 02:38 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org