From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Dave Young <hidave.darkstar@gmail.com>,
joe@perches.com, davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm][v2] ratelimit rewrite
Date: Thu, 8 May 2008 16:19:52 -0700 [thread overview]
Message-ID: <20080508231952.GC13851@linux.vnet.ibm.com> (raw)
In-Reply-To: <20080508122514.63482a06.akpm@linux-foundation.org>
On Thu, May 08, 2008 at 12:25:14PM -0700, Andrew Morton wrote:
> 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?
Yep -- there was a bug in this code a few months ago that was the
motivation for Dave's WARN_ON_RATELIMIT(). The bug has since been fixed,
so I would not expect this to trigger anymore, though.
Thanx, Paul
prev parent reply other threads:[~2008-05-08 23:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-06 2:25 [PATCH -mm][v2] ratelimit rewrite Dave Young
2008-05-06 19:24 ` Andrew Morton
2008-05-08 19:25 ` Andrew Morton
2008-05-08 23:19 ` Paul E. McKenney [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080508231952.GC13851@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=hidave.darkstar@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).