* [rfc] disable scheduler warnings during oopses. @ 2011-12-22 21:39 Dave Jones 2011-12-23 10:19 ` Ingo Molnar 2011-12-23 13:18 ` [tip:sched/core] sched: Disable " tip-bot for Dave Jones 0 siblings, 2 replies; 5+ messages in thread From: Dave Jones @ 2011-12-22 21:39 UTC (permalink / raw) To: Linux Kernel The panic-on-framebuffer code seems to cause a schedule to occur during an oops. This causes a bunch of extra spew as can be seen in https://bugzilla.redhat.com/attachment.cgi?id=549230 Would this (untested) patch be sufficient here, or does the drm code need rearchitecting to not perform allocations during panic ? Signed-off-by: Dave Jones <davej@redhat.com> diff --git a/kernel/sched.c b/kernel/sched.c index d6b149c..627f788 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -4321,6 +4321,9 @@ static noinline void __schedule_bug(struct task_struct *prev) { struct pt_regs *regs = get_irq_regs(); + if (oops_in_progress) + return; + printk(KERN_ERR "BUG: scheduling while atomic: %s/%d/0x%08x\n", prev->comm, prev->pid, preempt_count()); ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [rfc] disable scheduler warnings during oopses. 2011-12-22 21:39 [rfc] disable scheduler warnings during oopses Dave Jones @ 2011-12-23 10:19 ` Ingo Molnar 2011-12-23 12:06 ` Peter Zijlstra 2011-12-23 13:18 ` [tip:sched/core] sched: Disable " tip-bot for Dave Jones 1 sibling, 1 reply; 5+ messages in thread From: Ingo Molnar @ 2011-12-23 10:19 UTC (permalink / raw) To: Dave Jones, Linux Kernel Cc: Peter Zijlstra, Mike Galbraith, Linus Torvalds, Dave Airlie, Andrew Morton * Dave Jones <davej@redhat.com> wrote: > The panic-on-framebuffer code seems to cause a schedule > to occur during an oops. This causes a bunch of extra > spew as can be seen in https://bugzilla.redhat.com/attachment.cgi?id=549230 > > Would this (untested) patch be sufficient here, or does the drm > code need rearchitecting to not perform allocations during panic ? > > Signed-off-by: Dave Jones <davej@redhat.com> > > diff --git a/kernel/sched.c b/kernel/sched.c > index d6b149c..627f788 100644 > --- a/kernel/sched.c > +++ b/kernel/sched.c > @@ -4321,6 +4321,9 @@ static noinline void __schedule_bug(struct task_struct *prev) > { > struct pt_regs *regs = get_irq_regs(); > > + if (oops_in_progress) > + return; > + > printk(KERN_ERR "BUG: scheduling while atomic: %s/%d/0x%08x\n", > prev->comm, prev->pid, preempt_count()); > Doing that makes sense - if an oops in going on we don't want to produce recursive messages. Note that scheduler code has been moved to kernel/sched/, so i've changed the patch accordingly. Note that despite that, the DRM code *definitely* needs to be fixed to not allocate and schedule while printing on the framebuffer in KMS mode ... Thanks, Ingo ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [rfc] disable scheduler warnings during oopses. 2011-12-23 10:19 ` Ingo Molnar @ 2011-12-23 12:06 ` Peter Zijlstra 2011-12-23 13:42 ` Ingo Molnar 0 siblings, 1 reply; 5+ messages in thread From: Peter Zijlstra @ 2011-12-23 12:06 UTC (permalink / raw) To: Ingo Molnar Cc: Dave Jones, Linux Kernel, Mike Galbraith, Linus Torvalds, Dave Airlie, Andrew Morton On Fri, 2011-12-23 at 11:19 +0100, Ingo Molnar wrote: > * Dave Jones <davej@redhat.com> wrote: > > > The panic-on-framebuffer code seems to cause a schedule > > to occur during an oops. This causes a bunch of extra > > spew as can be seen in https://bugzilla.redhat.com/attachment.cgi?id=549230 > > > > Would this (untested) patch be sufficient here, or does the drm > > code need rearchitecting to not perform allocations during panic ? > > > > Signed-off-by: Dave Jones <davej@redhat.com> > > > > diff --git a/kernel/sched.c b/kernel/sched.c > > index d6b149c..627f788 100644 > > --- a/kernel/sched.c > > +++ b/kernel/sched.c > > @@ -4321,6 +4321,9 @@ static noinline void __schedule_bug(struct task_struct *prev) > > { > > struct pt_regs *regs = get_irq_regs(); > > > > + if (oops_in_progress) > > + return; > > + > > printk(KERN_ERR "BUG: scheduling while atomic: %s/%d/0x%08x\n", > > prev->comm, prev->pid, preempt_count()); > > > > Doing that makes sense - if an oops in going on we don't want to > produce recursive messages. Note that scheduler code has been > moved to kernel/sched/, so i've changed the patch accordingly. Urgh I would actually argue against merging this. What the KSM console does is horridly wrong, and simply papering over it doesn't help its cause. Its up there with USB-Serial console on wrongness. > Note that despite that, the DRM code *definitely* needs to be > fixed to not allocate and schedule while printing on the > framebuffer in KMS mode ... For sure, its plain insane and completely unreliable. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [rfc] disable scheduler warnings during oopses. 2011-12-23 12:06 ` Peter Zijlstra @ 2011-12-23 13:42 ` Ingo Molnar 0 siblings, 0 replies; 5+ messages in thread From: Ingo Molnar @ 2011-12-23 13:42 UTC (permalink / raw) To: Peter Zijlstra Cc: Dave Jones, Linux Kernel, Mike Galbraith, Linus Torvalds, Dave Airlie, Andrew Morton * Peter Zijlstra <a.p.zijlstra@chello.nl> wrote: > On Fri, 2011-12-23 at 11:19 +0100, Ingo Molnar wrote: > > * Dave Jones <davej@redhat.com> wrote: > > > > > The panic-on-framebuffer code seems to cause a schedule > > > to occur during an oops. This causes a bunch of extra > > > spew as can be seen in https://bugzilla.redhat.com/attachment.cgi?id=549230 > > > > > > Would this (untested) patch be sufficient here, or does the drm > > > code need rearchitecting to not perform allocations during panic ? > > > > > > Signed-off-by: Dave Jones <davej@redhat.com> > > > > > > diff --git a/kernel/sched.c b/kernel/sched.c > > > index d6b149c..627f788 100644 > > > --- a/kernel/sched.c > > > +++ b/kernel/sched.c > > > @@ -4321,6 +4321,9 @@ static noinline void __schedule_bug(struct task_struct *prev) > > > { > > > struct pt_regs *regs = get_irq_regs(); > > > > > > + if (oops_in_progress) > > > + return; > > > + > > > printk(KERN_ERR "BUG: scheduling while atomic: %s/%d/0x%08x\n", > > > prev->comm, prev->pid, preempt_count()); > > > > > > > Doing that makes sense - if an oops in going on we don't > > want to produce recursive messages. Note that scheduler code > > has been moved to kernel/sched/, so i've changed the patch > > accordingly. > > Urgh I would actually argue against merging this. What the KSM > console does is horridly wrong, and simply papering over it > doesn't help its cause. Its up there with USB-Serial console > on wrongness. Well, i agree in principle, but not escallating an already bad scenario would be a basic robustness rule. We do skip certain things on oops_in_progress already. Linus, Andrew, what would be your preference? Thanks, Ingo ^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip:sched/core] sched: Disable scheduler warnings during oopses 2011-12-22 21:39 [rfc] disable scheduler warnings during oopses Dave Jones 2011-12-23 10:19 ` Ingo Molnar @ 2011-12-23 13:18 ` tip-bot for Dave Jones 1 sibling, 0 replies; 5+ messages in thread From: tip-bot for Dave Jones @ 2011-12-23 13:18 UTC (permalink / raw) To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, davej, tglx, mingo Commit-ID: 664dfa65e84429d0b68694483e1de7365c7c56fb Gitweb: http://git.kernel.org/tip/664dfa65e84429d0b68694483e1de7365c7c56fb Author: Dave Jones <davej@redhat.com> AuthorDate: Thu, 22 Dec 2011 16:39:30 -0500 Committer: Ingo Molnar <mingo@elte.hu> CommitDate: Fri, 23 Dec 2011 11:20:50 +0100 sched: Disable scheduler warnings during oopses The panic-on-framebuffer code seems to cause a schedule to occur during an oops. This causes a bunch of extra spew as can be seen in: https://bugzilla.redhat.com/attachment.cgi?id=549230 Don't do scheduler debug checks when we are oopsing already. Signed-off-by: Dave Jones <davej@redhat.com> Link: http://lkml.kernel.org/r/20111222213929.GA4722@redhat.com Signed-off-by: Ingo Molnar <mingo@elte.hu> --- kernel/sched/core.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 081ece2..8ffe523 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -3077,6 +3077,9 @@ static noinline void __schedule_bug(struct task_struct *prev) { struct pt_regs *regs = get_irq_regs(); + if (oops_in_progress) + return; + printk(KERN_ERR "BUG: scheduling while atomic: %s/%d/0x%08x\n", prev->comm, prev->pid, preempt_count()); ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-12-23 13:44 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-12-22 21:39 [rfc] disable scheduler warnings during oopses Dave Jones 2011-12-23 10:19 ` Ingo Molnar 2011-12-23 12:06 ` Peter Zijlstra 2011-12-23 13:42 ` Ingo Molnar 2011-12-23 13:18 ` [tip:sched/core] sched: Disable " tip-bot for Dave Jones
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox