From: Peter Zijlstra <peterz@infradead.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org,
peter@hurleysoftware.com, rjw@rjwysocki.net,
torvalds@linux-foundation.org, tglx@linutronix.de,
eparis@redhat.com, umgwanakikbuti@gmail.com, marcel@holtmann.org,
ebiederm@xmission.com, davem@davemloft.net,
fengguang.wu@intel.com
Subject: Re: [PATCH 7/7] sched: Use WARN_ONCE for the might_sleep() TASK_RUNNING test
Date: Mon, 3 Nov 2014 08:56:57 +0100 [thread overview]
Message-ID: <20141103075657.GU10501@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20141031224237.GA29704@redhat.com>
On Fri, Oct 31, 2014 at 11:42:37PM +0100, Oleg Nesterov wrote:
> On 10/31, Peter Zijlstra wrote:
> >
> > In some cases this can trigger a true flood of output.
> >
> > Requested-by: Ingo Molnar <mingo@kernel.org>
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> > ---
> > kernel/sched/core.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -7301,7 +7301,7 @@ void __might_sleep(const char *file, int
> > * since we will exit with TASK_RUNNING make sure we enter with it,
> > * otherwise we will destroy state.
> > */
> > - if (WARN(current->state != TASK_RUNNING,
> > + if (WARN_ONCE(current->state != TASK_RUNNING,
>
> Agreed, but sorry for off-topic, can't resist.
>
> Sometimes I hate WARN_ONCE() because you can't reproduce the problem
> once again without reboot.
Yes, and the fact that you can only see the first fail, even if more are
present.
> Perhaps WARN_ON_RATELIMIT() should be used more often (not sure about
> this particular case). Or, perhaps, we can add a special section for
> these "__warned" variables and add, say, sysctl which clears that
> section ?
Yeah, maybe, /debug/warn_once/file/line/enable or whatnot. For now I'll
continue removing ONCEs whenever I feel like it though ;-)
prev parent reply other threads:[~2014-11-03 7:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-31 11:10 [PATCH 0/7] Various fixes for nested sleep stuff Peter Zijlstra
2014-10-31 11:10 ` [PATCH 1/7] sched,wait: Fix a kthread race with wait_woken() Peter Zijlstra
2014-10-31 22:13 ` Oleg Nesterov
2014-10-31 11:10 ` [PATCH 2/7] wait: Reimplement wait_event_freezable() Peter Zijlstra
2014-10-31 17:41 ` Peter Zijlstra
2014-10-31 21:38 ` Oleg Nesterov
2014-10-31 21:48 ` Peter Zijlstra
2014-10-31 21:53 ` Oleg Nesterov
2014-10-31 11:10 ` [PATCH 3/7] wait: Remove wait_event_freezekillable() Peter Zijlstra
2014-10-31 11:10 ` [PATCH 4/7] audit,wait: Fixup kauditd_thread wait loop Peter Zijlstra
2014-10-31 11:10 ` [PATCH 5/7] rfcomm: Fix broken wait construct Peter Zijlstra
2014-10-31 11:10 ` [PATCH 6/7] netdev: Fix sleeping inside wait event Peter Zijlstra
2014-10-31 11:10 ` [PATCH 7/7] sched: Use WARN_ONCE for the might_sleep() TASK_RUNNING test Peter Zijlstra
2014-10-31 22:42 ` Oleg Nesterov
2014-11-03 7:56 ` Peter Zijlstra [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=20141103075657.GU10501@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=eparis@redhat.com \
--cc=fengguang.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peter@hurleysoftware.com \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=umgwanakikbuti@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome