From: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
To: "Ryan Hope" <rmh3093@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Nick Piggin" <nickpiggin@yahoo.com.au>
Subject: Re: Performance Question: BUG_ON vs. WARN_ON_ONCE
Date: Mon, 14 Jul 2008 06:36:57 +0300 [thread overview]
Message-ID: <20080714063657.6d1fda18@linux360.ro> (raw)
In-Reply-To: <48f7fe350807131657v4b95340ajfaaacbb04eefa21f@mail.gmail.com>
On Sun, 13 Jul 2008 19:57:37 -0400
"Ryan Hope" <rmh3093@gmail.com> wrote:
> However, this causes the kernel to crash or oops under certain loads.
> Reverting this change makes the error go away. Is there any sort of
> performance difference between BUG_ON and WARN_ON_ONCE, I figure the
> change was for a reason so I am wondering what will result from this
> change. Any info would be appreciated.
>
> -Ryan
Looks like WARN_ON_ONCE declares and uses a static int variable, so
it's not reentrant. It should be an atomic static. Still, I don't see
how this could crash the kernel or even oops, or have any other
side-effects.
Could you post the oops? Are you sure the oops you're seeing isn't just
what WARN_ON et al. regularly produce?
Eduard
next prev parent reply other threads:[~2008-07-14 3:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-13 23:57 Performance Question: BUG_ON vs. WARN_ON_ONCE Ryan Hope
2008-07-14 3:36 ` Eduard - Gabriel Munteanu [this message]
2008-07-14 4:10 ` Ryan Hope
2008-07-14 4:12 ` Ryan Hope
2008-07-14 4:36 ` Eduard - Gabriel Munteanu
2008-07-14 4:51 ` Ryan Hope
2008-07-14 5:05 ` Nick Piggin
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=20080714063657.6d1fda18@linux360.ro \
--to=eduard.munteanu@linux360.ro \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=rmh3093@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 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.