netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Joe Lawrence <joe.lawrence@stratus.com>,
	netdev@vger.kernel.org, Jiri Pirko <jiri@resnulli.us>
Subject: Re: [PATCH] team: add rescheduling jiffy delay on !rtnl_trylock
Date: Sat, 4 Oct 2014 22:13:25 -0400	[thread overview]
Message-ID: <20141005021325.GB8549@htj.dyndns.org> (raw)
In-Reply-To: <20141004083732.GG5015@linux.vnet.ibm.com>

Hello,

On Sat, Oct 04, 2014 at 01:37:32AM -0700, Paul E. McKenney wrote:
> On Fri, Oct 03, 2014 at 03:37:01PM -0400, Joe Lawrence wrote:
> > I gave this a spin, probably inserting the call in the wrong place:
> > 
> > diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> > index 5dbe22a..77f128e 100644
> > --- a/kernel/workqueue.c
> > +++ b/kernel/workqueue.c
> > @@ -2045,7 +2045,8 @@ __acquires(&pool->lock)
> >          * indefinitely requeue itself while all other CPUs are trapped in
> >          * stop_machine.
> >          */
> > -       cond_resched();
> > +       if (!cond_resched())
> > +               rcu_note_context_switch(raw_smp_processor_id());
> > 
> >         spin_lock_irq(&pool->lock);
> 
> If the cond_resched() is in the right place, then you should be good.

Yeah, it looks good to me.

> FWIW, there is a cond_resched_rcu_qs() that should be going into the next
> merge window that could be used in place of the above two lines.  This is
> commit bde6c3aa9930 in -tip.

That sounds even better.

Joe, can you please send a patch with proper SOB and description?

Thanks.

-- 
tejun

  reply	other threads:[~2014-10-05  2:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-29 15:54 [PATCH] team: add rescheduling jiffy delay on !rtnl_trylock Joe Lawrence
2014-09-29 16:06 ` Tejun Heo
2014-10-02  6:43   ` Paul E. McKenney
2014-10-03 19:37     ` Joe Lawrence
2014-10-04  8:37       ` Paul E. McKenney
2014-10-05  2:13         ` Tejun Heo [this message]
2014-10-05 12:53           ` Joe Lawrence
2014-10-05 14:08             ` Paul E. McKenney
2014-10-05 16:11               ` Tejun Heo

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=20141005021325.GB8549@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=joe.lawrence@stratus.com \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    /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).