public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] make might_sleep() display the oopsing process
@ 2008-08-27 15:21 Joe Korty
  2008-08-28  9:36 ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Korty @ 2008-08-27 15:21 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Linux Kernel

Expand might_sleep's printk to indicate the oopsing process.

Signed-off-by: Joe Korty <joe.korty@ccur.com>

Index: 2.6.27-rc4-git4/kernel/sched.c
===================================================================
--- 2.6.27-rc4-git4.orig/kernel/sched.c	2008-08-26 17:44:34.000000000 -0400
+++ 2.6.27-rc4-git4/kernel/sched.c	2008-08-26 18:24:08.000000000 -0400
@@ -8183,8 +8183,8 @@
 		prev_jiffy = jiffies;
 		printk(KERN_ERR "BUG: sleeping function called from invalid"
 				" context at %s:%d\n", file, line);
-		printk("in_atomic():%d, irqs_disabled():%d\n",
-			in_atomic(), irqs_disabled());
+		printk("in_atomic():%d, irqs_disabled():%d, pid: %d, name: %s\n",
+			in_atomic(), irqs_disabled(), current->pid, current->comm);
 		debug_show_held_locks(current);
 		if (irqs_disabled())
 			print_irqtrace_events(current);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] make might_sleep() display the oopsing process
  2008-08-27 15:21 [PATCH] make might_sleep() display the oopsing process Joe Korty
@ 2008-08-28  9:36 ` Ingo Molnar
  2008-08-29 23:20   ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2008-08-28  9:36 UTC (permalink / raw)
  To: Joe Korty; +Cc: Linux Kernel


* Joe Korty <joe.korty@ccur.com> wrote:

> Expand might_sleep's printk to indicate the oopsing process.

good idea - applied to tip/sched/devel - thanks Joe.

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] make might_sleep() display the oopsing process
  2008-08-28  9:36 ` Ingo Molnar
@ 2008-08-29 23:20   ` Andrew Morton
  2008-08-30 14:45     ` Joe Korty
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2008-08-29 23:20 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: joe.korty, linux-kernel

On Thu, 28 Aug 2008 11:36:28 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> > Expand might_sleep's printk to indicate the oopsing process.
> 
> good idea

Why?  I don't recall ever having been interested in this information.

(I shouldn't have to ask questions like this.  Please spend a little
more time in preparing the patch descriptions).


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] make might_sleep() display the oopsing process
  2008-08-29 23:20   ` Andrew Morton
@ 2008-08-30 14:45     ` Joe Korty
  2008-08-30 16:04       ` Arjan van de Ven
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Korty @ 2008-08-30 14:45 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Ingo Molnar, linux-kernel@vger.kernel.org

On Fri, Aug 29, 2008 at 07:20:03PM -0400, Andrew Morton wrote:
> On Thu, 28 Aug 2008 11:36:28 +0200
> Ingo Molnar <mingo@elte.hu> wrote:
> 
> > > Expand might_sleep's printk to indicate the oopsing process.
> >
> > good idea
> 
> Why?  I don't recall ever having been interested in this information.
> 
> (I shouldn't have to ask questions like this.  Please spend a little
> more time in preparing the patch descriptions).

I wrote and used the patch once, as I wanted to know
which program in a lengthy multiple-program test suite
was triggering the problem.  That made it easier coming
up with a shortened test that would replicate the problem.

However I only needed it that one time so this patch can
be considered to be exceptionally optional :)

Joe




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] make might_sleep() display the oopsing process
  2008-08-30 14:45     ` Joe Korty
@ 2008-08-30 16:04       ` Arjan van de Ven
  0 siblings, 0 replies; 5+ messages in thread
From: Arjan van de Ven @ 2008-08-30 16:04 UTC (permalink / raw)
  To: Joe Korty; +Cc: Andrew Morton, Ingo Molnar, linux-kernel@vger.kernel.org

On Sat, 30 Aug 2008 10:45:20 -0400
Joe Korty <joe.korty@ccur.com> wrote:

> On Fri, Aug 29, 2008 at 07:20:03PM -0400, Andrew Morton wrote:
> > On Thu, 28 Aug 2008 11:36:28 +0200
> > Ingo Molnar <mingo@elte.hu> wrote:
> > 
> > > > Expand might_sleep's printk to indicate the oopsing process.
> > >
> > > good idea
> > 
> > Why?  I don't recall ever having been interested in this
> > information.
> > 
> > (I shouldn't have to ask questions like this.  Please spend a little
> > more time in preparing the patch descriptions).
> 
> I wrote and used the patch once, as I wanted to know
> which program in a lengthy multiple-program test suite
> was triggering the problem.  That made it easier coming
> up with a shortened test that would replicate the problem.
> 
> However I only needed it that one time so this patch can
> be considered to be exceptionally optional :)

WARN() and WARN_ON() already print the oopsing process.
so if might_sleep() just calls one of those it already prints it.
If it doesn't call one of these.. maybe it should?


-- 
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-30 16:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-27 15:21 [PATCH] make might_sleep() display the oopsing process Joe Korty
2008-08-28  9:36 ` Ingo Molnar
2008-08-29 23:20   ` Andrew Morton
2008-08-30 14:45     ` Joe Korty
2008-08-30 16:04       ` Arjan van de Ven

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