Re: [PATCH] Fix a complex race in hrtimer code.

From: Salman Qazi
Date: Mon Oct 11 2010 - 19:43:14 EST


On Mon, Oct 11, 2010 at 4:23 PM, Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, 11 Oct 2010 16:18:52 -0700
> Salman Qazi <sqazi@xxxxxxxxxx> wrote:
>
>> On Mon, Oct 11, 2010 at 3:43 PM, Andrew Morton
>> <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>>
>> > Poeple are using BUG waaaaay too often.
>> >
>>
>> If people are attentive about WARN_ON_ONCE, then I suppose that is a
>> better alternative.
>>
>> One of the reasons why I personally like BUG_ON is that it catches
>> problems early and makes people look (i.e. one can't ignore it, just
>> because one didn't notice, understand or care) before it compounds any
>> further.  It is very hard to debug a corrupted radix tree.  It is much
>> easier to understand and fix the fact that our assumptions regarding
>> the hrtimer state and locking are incorrect.
>>
>> I'd rather have a BUG_ON firing 100 times, close to the root cause,
>> instead of one case of unexplained data corruption far from the root
>> cause.  Just my $0.02.
>
> You're assuming that you are the one who observes the BUG_ON.  In a
> large number of cases (probably the majority) it's some random person
> on another continent.  Their box is dead and after a reboot there's
> nothing in the logs.  Now what?
>
>

fair enough. I'll send a patch with a WARN_ON_ONCE instead.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/