[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170622080456.GC6104@unicorn.suse.cz>
Date: Thu, 22 Jun 2017 10:04:56 +0200
From: Michal Kubecek <mkubecek@...e.cz>
To: Michael J Dilmore <michael.j.dilmore@...il.com>
Cc: Jay Vosburgh <jay.vosburgh@...onical.com>,
David Miller <davem@...emloft.net>, vfalico@...il.com,
andy@...yhouse.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, joe@...ches.com
Subject: Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c
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
Powered by blists - more mailing lists