public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
	laijs@cn.fujitsu.com, dipankar@in.ibm.com,
	akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca,
	josh@joshtriplett.org, niv@us.ibm.com, tglx@linutronix.de,
	peterz@infradead.org, rostedt@goodmis.org,
	Valdis.Kletnieks@vt.edu, dhowells@redhat.com,
	edumazet@google.com, darren@dvhart.com, sbw@mit.edu,
	patches@linaro.org, Paul Gortmaker <paul.gortmaker@windriver.com>
Subject: Re: [PATCH tip/core/urgent 1/2] rcu: Prevent soft-lockup complaints about no-CBs CPUs
Date: Sat, 5 Jan 2013 09:54:40 -0800	[thread overview]
Message-ID: <20130105175440.GE19783@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAFTL4hyYh=C6-jPBm0pWjn2xeDRGtYVGYD46hSr=OfPjNtuDGg@mail.gmail.com>

On Sat, Jan 05, 2013 at 06:21:01PM +0100, Frederic Weisbecker wrote:
> Hi Paul,
> 
> 2013/1/5 Paul E. McKenney <paulmck@linux.vnet.ibm.com>:
> > From: Paul Gortmaker <paul.gortmaker@windriver.com>
> >
> > The wait_event() at the head of the rcu_nocb_kthread() can result in
> > soft-lockup complaints if the CPU in question does not register RCU
> > callbacks for an extended period.  This commit therefore changes
> > the wait_event() to a wait_event_interruptible().
> >
> > Reported-by: Frederic Weisbecker <fweisbec@gmail.com>
> > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > ---
> >  kernel/rcutree_plugin.h |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
> > index f6e5ec2..43dba2d 100644
> > --- a/kernel/rcutree_plugin.h
> > +++ b/kernel/rcutree_plugin.h
> > @@ -2366,10 +2366,11 @@ static int rcu_nocb_kthread(void *arg)
> >         for (;;) {
> >                 /* If not polling, wait for next batch of callbacks. */
> >                 if (!rcu_nocb_poll)
> > -                       wait_event(rdp->nocb_wq, rdp->nocb_head);
> > +                       wait_event_interruptible(rdp->nocb_wq, rdp->nocb_head);
> >                 list = ACCESS_ONCE(rdp->nocb_head);
> >                 if (!list) {
> >                         schedule_timeout_interruptible(1);
> > +                       flush_signals(current);
> 
> Why is that needed?

To satisfy my paranoia.  ;-)  And in case someone ever figures out some
way to send a signal to a kthread.

							Thanx, Paul


  reply	other threads:[~2013-01-05 17:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-05 16:58 [PATCH tip/core/urgent] no-CB CPU changes for 3.8 Paul E. McKenney
2013-01-05 16:58 ` [PATCH tip/core/urgent 1/2] rcu: Prevent soft-lockup complaints about no-CBs CPUs Paul E. McKenney
2013-01-05 16:58   ` [PATCH tip/core/urgent 2/2] rcu: Make rcu_nocb_poll an early_param instead of module_param Paul E. McKenney
2013-01-05 17:21   ` [PATCH tip/core/urgent 1/2] rcu: Prevent soft-lockup complaints about no-CBs CPUs Frederic Weisbecker
2013-01-05 17:54     ` Paul E. McKenney [this message]
2013-01-05 18:29       ` Frederic Weisbecker

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=20130105175440.GE19783@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=darren@dvhart.com \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mingo@elte.hu \
    --cc=niv@us.ibm.com \
    --cc=patches@linaro.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sbw@mit.edu \
    --cc=tglx@linutronix.de \
    /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