[PATCH] [3/3] Use WARN_ON_SECS in rcupreempt.h

From: Dave Young
Date: Mon Mar 10 2008 - 02:33:43 EST


Use WARN_ON_SECS in rcupreempt.h to avoid warning flood

Signed-off-by: Dave Young <hidave.darkstar@xxxxxxxxx>

---
include/linux/rcupreempt.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff -upr linux/include/linux/rcupreempt.h linux.new/include/linux/rcupreempt.h
--- linux/include/linux/rcupreempt.h 2008-03-10 13:33:13.000000000 +0800
+++ linux.new/include/linux/rcupreempt.h 2008-03-10 13:32:35.000000000 +0800
@@ -88,7 +88,7 @@ DECLARE_PER_CPU(long, dynticks_progress_
static inline void rcu_enter_nohz(void)
{
__get_cpu_var(dynticks_progress_counter)++;
- WARN_ON(__get_cpu_var(dynticks_progress_counter) & 0x1);
+ WARN_ON_SECS(__get_cpu_var(dynticks_progress_counter) & 0x1, 10);
mb();
}

@@ -96,7 +96,7 @@ static inline void rcu_exit_nohz(void)
{
mb();
__get_cpu_var(dynticks_progress_counter)++;
- WARN_ON(!(__get_cpu_var(dynticks_progress_counter) & 0x1));
+ WARN_ON_SECS(!(__get_cpu_var(dynticks_progress_counter) & 0x1), 10);
}

#else /* CONFIG_NO_HZ */
--
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/