From: Michal Kubecek <mkubecek@suse.cz>
To: Michael J Dilmore <michael.j.dilmore@gmail.com>
Cc: Jay Vosburgh <jay.vosburgh@canonical.com>,
David Miller <davem@davemloft.net>,
vfalico@gmail.com, andy@greyhouse.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, joe@perches.com
Subject: Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c
Date: Thu, 22 Jun 2017 10:04:56 +0200 [thread overview]
Message-ID: <20170622080456.GC6104@unicorn.suse.cz> (raw)
In-Reply-To: <6dd7cfa3-9d3f-ed54-3278-af37e9d0f266@gmail.com>
On Thu, Jun 22, 2017 at 12:04:54AM +0100, Michael J Dilmore wrote:
>
> Is it worth at least wrapping BUG_ON in an unlikely macro then?
See BUG_ON() definition:
#ifndef HAVE_ARCH_BUG_ON
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
#endif
where HAVE_ARCH_BUG_ON is defined only on powerpc and mips. It makes
good sense, you don't want to BUG_ON() on a condition unless it's
extremely unlikely. (Except for debugging purpose but even then you
don't really care about fine optimization when you are going to oops.)
Michal Kubecek
next prev parent reply other threads:[~2017-06-22 8:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-21 18:02 [PATCH] Convert BUG_ON to WARN_ON in bond_options.c Michael J Dilmore
2017-06-21 18:33 ` Jay Vosburgh
2017-06-21 21:35 ` Michael D
2017-06-21 21:36 ` David Miller
2017-06-21 21:41 ` Michael D
2017-06-21 21:56 ` David Miller
2017-06-21 22:27 ` Michael J Dilmore
2017-06-21 22:39 ` Jay Vosburgh
2017-06-21 23:04 ` Michael J Dilmore
2017-06-22 8:04 ` Michal Kubecek [this message]
2017-06-22 8:14 ` Bjørn Mork
2017-06-21 22:31 ` Jay Vosburgh
2017-06-21 21:57 ` David Miller
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=20170622080456.GC6104@unicorn.suse.cz \
--to=mkubecek@suse.cz \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=jay.vosburgh@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.j.dilmore@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=vfalico@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;
as well as URLs for NNTP newsgroup(s).