lkml.org 
[lkml]   [2008]   [May]   [8]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
DateThu, 8 May 2008 12:25:14 -0700
FromAndrew Morton <>
SubjectRe: [PATCH -mm][v2] ratelimit rewrite
On Tue, 6 May 2008 10:25:58 +0800
Dave Young <hidave.darkstar@gmail.com> wrote:

>  static inline void rcu_enter_nohz(void)
>  {
> +	static DEFINE_RATELIMIT_STATE(rs, 10 * HZ, 1);
>  	smp_mb(); /* CPUs seeing ++ must see prior RCU read-side crit sects */
>  	__get_cpu_var(rcu_dyntick_sched).dynticks++;
> -	WARN_ON_SECS(__get_cpu_var(rcu_dyntick_sched).dynticks & 0x1, 10);
> +	WARN_ON_RATELIMIT(__get_cpu_var(rcu_dyntick_sched).dynticks & 0x1, &rs);
>  }
> 
>  static inline void rcu_exit_nohz(void)
>  {
> +	static DEFINE_RATELIMIT_STATE(rs, 10 * HZ, 1);
>  	__get_cpu_var(rcu_dyntick_sched).dynticks++;
>  	smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */
> -	WARN_ON_SECS(!(__get_cpu_var(rcu_dyntick_sched).dynticks & 0x1), 10);
> +	WARN_ON_RATELIMIT(!(__get_cpu_var(rcu_dyntick_sched).dynticks & 0x1),
> +			&rs);

Why are we altering the RCU code in this patch, btw?  It seems fairly
random that we happened to choose these particular WARN_ONs.  Do they have
a history of triggering?

--
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: 2008-05-08 19:29    [W:0.137 / U:0.110 seconds]
©2003-2008 Jasper Spaans