lkml.org 
[lkml]   [2006]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix WARN_ON / WARN_ON_ONCE regression
Andrew Morton wrote:
> On Tue, 03 Oct 2006 17:09:29 -0700
> Tim Chen <tim.c.chen@linux.intel.com> wrote:
>
>
>>On Tue, 2006-10-03 at 17:07 -0700, Andrew Morton wrote:
>>
>>
>>>Perhaps the `static int __warn_once' is getting put in the same cacheline
>>>as some frequently-modified thing. Perhaps try marking that as __read_mostly?
>>>
>>
>>I've tried marking static int __warn_once as __read_mostly. However, it
>>did not help with reducing the cache miss :(
>>
>>So I would suggest reversing the "Let WARN_ON/WARN_ON_ONCE return the
>>condition" patch. It has just been added 3 days ago so reversing it
>>should not be a problem.
>>
>
>
> Not yet, please. This is presently a mystery, and we need to work out
> what's going on.

Still, it seems kind of odd to add this IMO. Especially the WARN_ON_ONCE
makes the if statement less readable.

if (WARN_ON_ONCE(blah)) {
}

What does that mean? Without looking at the implementation, that says
the condition is true at most once, when the warning is printed.

What's wrong with adding WARN and WARN_ONCE, and eating the single extra
line? You're always telling people to do that with assignments (which I
agree with, but are _more_ readable than this WARN_ON_ONCE thing).

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-04 03:49    [W:0.145 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site