[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141005021325.GB8549@htj.dyndns.org>
Date: Sat, 4 Oct 2014 22:13:25 -0400
From: Tejun Heo <tj@...nel.org>
To: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc: Joe Lawrence <joe.lawrence@...atus.com>, netdev@...r.kernel.org,
Jiri Pirko <jiri@...nulli.us>
Subject: Re: [PATCH] team: add rescheduling jiffy delay on !rtnl_trylock
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists