lkml.org 
[lkml]   [2006]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] Fix WARN_ON / WARN_ON_ONCE regression
Date
From
On Thursday 05 October 2006 04:36, Andrew Morton wrote:
> On Thu, 5 Oct 2006 04:13:07 -0400
> Andrew James Wade <andrew.j.wade@gmail.com> wrote:
>
> > (...)
>
>
> That all looks OK (by sheer luck).
>
> Well. What's the cache line size on that machine? Every exit() will cause
> a down_read() on task_exit_notifier's lock which might affect things. And
> I think you snipped the above list a bit short (depending on that line
> size).
>
>
> But still, we know that moving those things into __read_mostly didn't fix
> it, yes?

No. To my knowledge Tim Chen hasn't tried __read_mostly, and I have not
attempted to replicate the test case. (I only have a uniprocessor
machine.) Core 2 machines have a cache line size of 64 bytes, but Tim
Chen is likely using a different kernel/.config than I am so my objdump
isn't definitive.

Tim, perhaps you can try the __read_mostly marking as Andrew suggests?

signed-off-by: Andrew Wade <andrew.j.wade@gmail.com>
upN a/include/asm-generic/bug.h b/include/asm-generic/bug.h
--- a/include/asm-generic/bug.h 2006-10-05 16:16:37.000000000 -0400
+++ b/include/asm-generic/bug.h 2006-10-05 16:33:08.000000000 -0400
@@ -42,7 +42,7 @@
#endif

#define WARN_ON_ONCE(condition) ({ \
- static int __warn_once = 1; \
+ static int __warn_once __read_mostly = 1; \
typeof(condition) __ret_warn_once = (condition);\
\
if (likely(__warn_once)) \
-
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-05 23:35    [W:0.056 / U:1.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site